Redo slamsound using MFE_JUSTHITFLOOR

This commit is contained in:
indev committed 2023-08-27 11:13:47 +03:00
1 parent 1175247614
commit 9208a7233f
3 files changed
+2 -10

No files matched your search

+2 -6
View File
@@ -3000,8 +3000,8 @@ static void K_StretchPlayerGravity(player_t *p)
I_Assert(p != NULL);
I_Assert(p->mo != NULL);
I_Assert(!P_MobjWasRemoved(p->mo));
if (!p->mo->stretchonground && P_IsObjectOnGround(p->mo) && (cv_slamsound.value == 1))
if (p->mo->eflags & MFE_JUSTHITFLOOR && (cv_slamsound.value == 1))
S_StartSound(p->mo, sfx_s3k4c);
if (!P_IsObjectOnGround(p->mo))
@@ -3022,7 +3022,6 @@ static void K_StretchPlayerGravity(player_t *p)
{
p->mo->spritexscale = (dxs);
p->mo->spriteyscale = (dys);
p->mo->stretchonground = false;
}
}
else
@@ -3037,10 +3036,7 @@ static void K_StretchPlayerGravity(player_t *p)
p->mo->stretchslam -= (4*mos);
else
p->mo->stretchslam = 0;
p->mo->stretchonground = true;
}
}
static INT32 K_FindPlayerNum(player_t *plyr)
-2
View File
@@ -9563,8 +9563,6 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
mobj->spritexscale = mobj->realxscale;
mobj->spriteyscale = mobj->realyscale;
mobj->spritexoffset = mobj->spriteyoffset = 0;
mobj->stretchonground = true;
// set subsector and/or block links
P_SetThingPosition(mobj);
-2
View File
@@ -394,8 +394,6 @@ typedef struct mobj_s
boolean colorized; // Whether the mobj uses the rainbow colormap
boolean rollmodel; // OpenGL: Should this model rotate?
boolean stretchonground; // Play funni sound when player lands on ground with stretch
// WARNING: New fields must be added separately to savegame and Lua.
} mobj_t;