The culprit appears to be this function:
Code: Select all
void X_ModernBFGZap()
{
// go around in a circle and zap things in an n-degree slice.
float origAngle = self.angle;
for(int a = 0; a < 360; a += lookParams.fov) {
self.angle = origAngle + a;
// temporarily null the target and search for a new one in an arc.
// if we've got it, do the zap.
// [NOTE] this will not target enemy players. This is OK, frankly.
// if I ever restore this, be sure to re-add $ARG_OB_BFGZAP
if(LookForEnemies(false, self.lookParams)) {
// do a test trace to make sure the person who fired the shot
// (or an ally) isn't in the way. That would be slightly
// unfortunate. ;)
FTranslatedLineTarget aimedAt;
AimLineAttack(self.AngleTo(self.target), self.lookParams.maxdist, aimedAt);
if(aimedAt.linetarget && aimedAt.linetarget != self.whoFiredMe && !aimedAt.linetarget.isFriend(self.whoFiredMe)) {
A_CustomRailgun(25
, flags: RGF_SILENT | RGF_NOPIERCING
, aim: 1
, maxdiff: 32
, pufftype: "ArgBFGSprayZ"
, sparsity: 4
, spawnclass: "ArgBFGZapperTrail"
, spawnofs_z: -8
);
}
}
}
self.target = self.whoFiredMe;
self.angle = origAngle;
A_SpawnItemEx("ArgBFGTrail", frandom(-2,2), frandom(-2,2), frandom(-2,2), 0, 0, 0, 0, SXF_CLIENTSIDE, 0);
}
Originally I saw this bug report and thought that's the cause of this issue, but that fix did not appear to have any effect.
I hastily cobbled together a example wad, which is a simple testmap with Argent BFG torn out of the main mod in it. Simply fire the BFG once in 4.12/4.13 and observe the lag; then compare to doing the same in 4.11. (I put it on Discord because I don't really know where else to upload it; please tell if you want me to upload it somewhere else)