From b4933bacb3ae58b096dae11d4afdb09288f33637 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Sun, 8 Mar 2020 01:37:48 -0500 Subject: [PATCH] Didn't work, let's try this objectSpeed was getting scaled with the spring's size, when only the spring's base speed should be scaled --- src/p_map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 5a9f4b8c3..a732dc551 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -118,8 +118,8 @@ boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z) boolean P_DoSpring(mobj_t *spring, mobj_t *object) { //INT32 pflags; - const fixed_t hscale = FRACUNIT + (FRACUNIT - object->scale); - const fixed_t vscale = FRACUNIT + (object->scale - FRACUNIT); + const fixed_t hscale = mapobjectscale + (mapobjectscale - object->scale); + const fixed_t vscale = mapobjectscale + (object->scale - mapobjectscale); fixed_t vertispeed = spring->info->mass; fixed_t horizspeed = spring->info->damage; UINT8 starcolor = (spring->info->painchance % MAXTRANSLATIONS); @@ -195,7 +195,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) if (horizspeed) { angle_t finalAngle = spring->angle; - fixed_t finalSpeed = horizspeed; + fixed_t finalSpeed = FixedMul(horizspeed, FixedSqrt(FixedMul(hscale, spring->scale))); fixed_t objectSpeed; if (object->player) @@ -273,7 +273,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) // Horizontal speed is used as a minimum thrust, not a direct replacement finalSpeed = max(objectSpeed, finalSpeed); - P_InstaThrustEvenIn2D(object, finalAngle, FixedMul(finalSpeed, FixedSqrt(FixedMul(hscale, spring->scale)))); + P_InstaThrustEvenIn2D(object, finalAngle, finalSpeed); } // Re-solidify