mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- fixed everlasting fast projectile after hitting ceiling
Without the test for ceiling hit fast projectile could enter its Death state every tick infinitely https://forum.zdoom.org/viewtopic.php?t=63023
This commit is contained in:
parent
6c168d88e4
commit
4a9947eaa1
1 changed files with 7 additions and 1 deletions
|
@ -82,7 +82,13 @@ class FastProjectile : Actor
|
|||
}
|
||||
|
||||
// Handle movement
|
||||
if (Vel != (0, 0, 0) || (pos.Z != floorz))
|
||||
bool ismoved = Vel != (0, 0, 0)
|
||||
// Check Z position set during previous tick.
|
||||
// It should be strictly equal to the argument of SetZ() function.
|
||||
|| ( (pos.Z != floorz ) /* Did it hit the floor? */
|
||||
&& (pos.Z != ceilingz - Height) /* Did it hit the ceiling? */ );
|
||||
|
||||
if (ismoved)
|
||||
{
|
||||
// force some lateral movement so that collision detection works as intended.
|
||||
if (bMissile && Vel.X == 0 && Vel.Y == 0 && !IsZeroDamage())
|
||||
|
|
Loading…
Reference in a new issue