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
This commit is contained in:
Sally Cochenour 2020-03-08 01:37:48 -05:00
parent 8c1aec3713
commit b4933bacb3

View file

@ -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