mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +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
0b2a919bbe
commit
99479d84b1
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