mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-27 22:42:29 +00:00
- fixed: AFastProjectile did not work properly for perfectly vertically moving missiles. Like AActor::Tick it needs to ensure that a tiny bit of lateral movement is present so that collision detection and the Effect() function work as intended.
This commit is contained in:
parent
0bce6e3925
commit
865863ab6f
1 changed files with 6 additions and 0 deletions
|
@ -54,6 +54,12 @@ void AFastProjectile::Tick ()
|
||||||
// Handle movement
|
// Handle movement
|
||||||
if (!Vel.isZero() || (Z() != floorz))
|
if (!Vel.isZero() || (Z() != floorz))
|
||||||
{
|
{
|
||||||
|
// force some lateral movement so that collision detection works as intended.
|
||||||
|
if ((flags & MF_MISSILE) && Vel.X == 0 && Vel.Y == 0 && !IsZeroDamage())
|
||||||
|
{
|
||||||
|
Vel.X = MinVel;
|
||||||
|
}
|
||||||
|
|
||||||
frac = Vel / count;
|
frac = Vel / count;
|
||||||
changexy = frac.X != 0 || frac.Y != 0;
|
changexy = frac.X != 0 || frac.Y != 0;
|
||||||
int ripcount = count / 8;
|
int ripcount = count / 8;
|
||||||
|
|
Loading…
Reference in a new issue