p_enemy.c: All object gravity arc calculations now collaborate with mapobjectscale again.

This commit is contained in:
toaster 2023-02-16 16:52:55 +00:00 committed by NepDisk
parent 608e2b6844
commit e832cf5963

View file

@ -10178,6 +10178,9 @@ void A_BrakLobShot(mobj_t *actor)
else
g = gravity;
// Scale with map
g = FixedMul(g, mapobjectscale);
// Look up distance between actor and its target
x = P_AproxDistance(actor->target->x - actor->x, actor->target->y - actor->y);
if (!aimDirect)
@ -10293,6 +10296,9 @@ void A_NapalmScatter(mobj_t *actor)
else
g = gravity;
// Scale with map
g = FixedMul(g, mapobjectscale);
// vy = (g*(airtime-1))/2
vy = FixedMul(g,(airtime-(1<<FRACBITS)))>>1;
// vx = distance/airtime
@ -11002,7 +11008,11 @@ void A_Boss5Jump(mobj_t *actor)
if (!actor->tracer)
return; // Don't even bother if we've got nothing to aim at.
g = FixedMul(gravity, mapobjectscale);
// Look up actor's current gravity situation
g = FixedMul(gravity, P_GetSectorGravityFactor(actor->subsector->sector));
// Scale with map
g = FixedMul(g, mapobjectscale);
// Look up distance between actor and its tracer
x = FixedHypot(actor->tracer->x - actor->x, actor->tracer->y - actor->y);