Merge branch 'goop-dampen' into 'next'

Goo Water (THZ Goop) adjustements

At Nev3r's request:
Adjusted goop so that you spend less time bouncing around in it. The goop will become a walkable surface with a higher velocity threshold.

The actual goop physics haven't been altered as far as the initial entrance and underwater time is concerned, only leaving goop and subsequent bounces has been dampened significantly.

See merge request !7
This commit is contained in:
Alam Ed Arias 2015-06-18 10:11:27 -04:00
commit c4ac9643ad
2 changed files with 3 additions and 5 deletions

View file

@ -1223,7 +1223,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
{ {
// If you're inside goowater and slowing down // If you're inside goowater and slowing down
fixed_t sinklevel = FixedMul(thing->info->height/6, thing->scale); fixed_t sinklevel = FixedMul(thing->info->height/6, thing->scale);
fixed_t minspeed = FixedMul(thing->info->height/12, thing->scale); fixed_t minspeed = FixedMul(thing->info->height/9, thing->scale);
if (thing->z < *rover->topheight && *rover->bottomheight < thingtop if (thing->z < *rover->topheight && *rover->bottomheight < thingtop
&& abs(thing->momz) < minspeed) && abs(thing->momz) < minspeed)
{ {

View file

@ -2525,10 +2525,8 @@ void P_MobjCheckWater(mobj_t *mobj)
return; return;
if ((mobj->eflags & MFE_GOOWATER || wasingoo)) { // Decide what happens to your momentum when you enter/leave goopy water. if ((mobj->eflags & MFE_GOOWATER || wasingoo)) { // Decide what happens to your momentum when you enter/leave goopy water.
if (wasinwater && P_MobjFlip(mobj)*mobj->momz > 0) if (P_MobjFlip(mobj)*mobj->momz < 0) // You are entering the goo?
mobj->momz = FixedMul(mobj->momz, FixedDiv(9*FRACUNIT, 8*FRACUNIT)); // Give the mobj a little out-of-goo boost. mobj->momz = FixedMul(mobj->momz, FixedDiv(2*FRACUNIT, 5*FRACUNIT)); // kill momentum significantly, to make the goo feel thick.
else if (P_MobjFlip(mobj)*mobj->momz < 0)
mobj->momz = FixedMul(mobj->momz, FixedDiv(2*FRACUNIT, 5*FRACUNIT)); // KILL its momentum.
} }
else if (wasinwater && P_MobjFlip(mobj)*mobj->momz > 0) else if (wasinwater && P_MobjFlip(mobj)*mobj->momz > 0)
mobj->momz = FixedMul(mobj->momz, FixedDiv(780*FRACUNIT, 457*FRACUNIT)); // Give the mobj a little out-of-water boost. mobj->momz = FixedMul(mobj->momz, FixedDiv(780*FRACUNIT, 457*FRACUNIT)); // Give the mobj a little out-of-water boost.