From 40b4cc845b128ac6dc6e8c4107debda737ef352e Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 7 Jan 2024 23:10:59 -0800 Subject: [PATCH] Battle UFO: tractor pull strength is stronger at bottom, weaker at top --- src/p_map.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index 6c0c75b72..ca91cfbe2 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -787,7 +787,9 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) if (!tm.thing->player || !tm.thing->player->fastfall) { - P_SetObjectMomZ(tm.thing, FRACUNIT, true); + fixed_t tractorHeight = 211*mapobjectscale; + fixed_t zRange = FixedDiv(thing->z - tm.thing->z, tractorHeight); + P_SetObjectMomZ(tm.thing, max(zRange, FRACUNIT/16), true); } fixed_t friction = 33*FRACUNIT/35;