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

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!

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

Postby Accensus » Sat Jun 13, 2020 6:49 am

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
Accensus
Vector, locked in.
 
Joined: 11 Feb 2016
Location: Somalia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Graf Zahl » Sat Jun 13, 2020 10:38 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Matt » Sun Jun 14, 2020 10:36 am

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
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

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

Postby Graf Zahl » Sun Jun 14, 2020 11:05 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Matt » Sun Jun 14, 2020 10:37 pm

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).
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia


Return to Bugs

Who is online

Users browsing this forum: Chris and 0 guests