FastProjectile doesn't like 1-tic durations in Death.

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

FastProjectile doesn't like 1-tic durations in Death.

Post by Accensus »

Tested on 4.4.0, but I doubt this is recent.

And by doesn't like I mean it misbehaves completely.

1. Get this commit of Bullet-Eye.
2. Start a new game and summon volleyshotweapon.
3. Fire a volley at the ground. The effects will keep spawning once the projectile hits. This is only the case when the projectile hits the ground.
4. Open up the mod and navigate to Actors\Weapons\Area\VolleyShot.txt, Line 56 and 60. Where the frame duration is 1, change that to 0.
5. Repeat 2 and 3. Projectile now works correctly.

While writing this post I got told that FastProjectile doesn't call Super.Tick() which may make it behave weirdly, but that'd mean Spawn would also behave weirdly, wouldn't it? I seriously can't tell why this happens.

Bonus: If you move the 1 tic duration to the state above the TNT1 one, the effect won't be spawned and the projectile will just stick to the ground, but it definitely won't explode.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: FastProjectile doesn't like 1-tic durations in Death.

Post by Graf Zahl »

The FastProjectile skips the main Tick because that function cannot handle fast moving things. The unfortunate side effect is that it suffers from several limitations because it uses a simplified movement logic.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: FastProjectile doesn't like 1-tic durations in Death.

Post by Matt »

I think this can be addressed by having the fastprojectile fall back to {super.Tick();return;} if it doesn't have +missile set.

(There might be more to it than this, I remember struggling with a similar problem for a long time in HD but I don't know the exact specific thing or things that addressed it)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: FastProjectile doesn't like 1-tic durations in Death.

Post by Graf Zahl »

No, no , no. The FastProjectile would cease working if it called the parent method ever. It completely needs to circumvent the default movement code or very strange things may happen.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: FastProjectile doesn't like 1-tic durations in Death.

Post by Matt »

I was imagining that in the very beginning, like just after the IsFrozen checks. If any of the special FP code is being called then it would not be calling the regular tick function.

My assumption here is that there's no reason for an actor to be moving like a fastprojectile in those situations where it's not even a projectile at all (e.g., has hit something and is in death state).
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: FastProjectile doesn't like 1-tic durations in Death.

Post by Accensus »

Not a bug. Thread should probably be closed.
Post Reply

Return to “Closed Bugs [GZDoom]”