mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Battle UFO: tractor account for underwater gravity
This commit is contained in:
parent
fed0740d99
commit
4f56006cc8
1 changed files with 8 additions and 1 deletions
|
|
@ -789,7 +789,14 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
||||||
{
|
{
|
||||||
fixed_t tractorHeight = 211*mapobjectscale;
|
fixed_t tractorHeight = 211*mapobjectscale;
|
||||||
fixed_t zRange = FixedDiv(thing->z - tm.thing->z, tractorHeight);
|
fixed_t zRange = FixedDiv(thing->z - tm.thing->z, tractorHeight);
|
||||||
P_SetObjectMomZ(tm.thing, max(zRange, FRACUNIT/16), true);
|
fixed_t momZ = max(zRange, FRACUNIT/16);
|
||||||
|
|
||||||
|
if (tm.thing->eflags & MFE_UNDERWATER)
|
||||||
|
{
|
||||||
|
momZ = (117 * momZ) / 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
P_SetObjectMomZ(tm.thing, momZ, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed_t friction = 33*FRACUNIT/35;
|
fixed_t friction = 33*FRACUNIT/35;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue