Ed the Bat wrote:In case anyone's interested, I found a solution for my question from Page 1:
By giving A_RailAttack the RGF_EXPLICITANGLE flag, and setting the spread_z parameter to BulletSlope()-pitch, I now have a railgun that respects autoaim.
Thanks for sharing, Ed!
////////////////
I am trying to call GetCVar from an EventHandler but it seems that GetCVar is locked to Actors. Is this the correct way to do it, and should I delete a or will that be handled automatically?
Code: Select all
int _W_GetUpdateInterval(void)
{
let a = new("Actor");
int i = a.GetCVar("sv_weatherupdateinterval");
return i >= 1 && i < 100 ? i : 1;
}