[4.12-4.13] Argent nuDoom style BFG broken

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
Melany

[4.12-4.13] Argent nuDoom style BFG broken

Post by Melany »

Hi. While playing Xaser's Argent mod in 4.12, I noticed that the d4 style BFG is horrifically broken. It is supposed to fire tracers in all directions, hitting each enemy with only a few at a time, but in 4.12 and 4.13 it zeroes in on a single monster with all tracers at once and causes extreme damage and horrific lag.

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);
	}
I confess I do not entirely understand it, but far as I can tell, the lookParams.fov (which is set to 30 earlier) is ignored in 4.12 and 4.13, causing the issue. In 4.11 and earllier, it works correctly.

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)
Melany

Re: [4.12-4.13] Argent nuDoom style BFG broken

Post by Melany »

EDIT: I noticed some five minutes after posting that this may be a duplicate of this problem.
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: [4.12-4.13] Argent nuDoom style BFG broken

Post by Blue Shadow »

There are a couple of spots (in p_enemy.cpp at least) where P_IsVisible is called with looking all around being explicitly set to true: in ValidEnemyInBlock, here, and LookForTIDInBlock, here.

Earlier this year, P_IsVisible was changed to zero the FOV if looking all around is set to true.

Return to “Bugs [GZDoom]”