mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- Duke: Clean up player/actor accesses in makepainsounds()
.
This commit is contained in:
parent
0749a65c81
commit
079df4dd8f
4 changed files with 4 additions and 5 deletions
|
@ -102,7 +102,7 @@ void dokneeattack(DDukePlayer* const p);
|
|||
int endoflevel(int snum);
|
||||
void playerisdead(int snum, int psectlotag, double fz, double cz);
|
||||
void footprints(int snum);
|
||||
int makepainsounds(int snum, int type);
|
||||
int makepainsounds(DDukePlayer* const p, int type);
|
||||
void playerCrouch(int snum);
|
||||
void playerJump(int snum, double fz, double cz);
|
||||
|
||||
|
|
|
@ -412,9 +412,8 @@ void dokneeattack(DDukePlayer* const p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int makepainsounds(int snum, int type)
|
||||
int makepainsounds(DDukePlayer* const p, int type)
|
||||
{
|
||||
auto p = getPlayer(snum);
|
||||
auto actor = p->GetActor();
|
||||
int k = 0;
|
||||
|
||||
|
|
|
@ -1728,7 +1728,7 @@ void processinput_d(int snum)
|
|||
{
|
||||
int surface = tilesurface(sect->floortexture);
|
||||
int whichsound = surface == TSURF_ELECTRIC? 0 : surface == TSURF_SLIME? 1 : surface == TSURF_PLASMA? 2 : -1;
|
||||
k = makepainsounds(snum, whichsound);
|
||||
k = makepainsounds(p, whichsound);
|
||||
}
|
||||
|
||||
if (k)
|
||||
|
|
|
@ -2555,7 +2555,7 @@ void processinput_r(int snum)
|
|||
{
|
||||
int surface = tilesurface(sect->floortexture);
|
||||
int whichsound = surface == TSURF_ELECTRIC ? 0 : surface == TSURF_SLIME ? 1 : surface == TSURF_PLASMA ? 2 : surface == TSURF_MAGMA ? 3 : -1;
|
||||
k = makepainsounds(snum, whichsound);
|
||||
k = makepainsounds(p, whichsound);
|
||||
}
|
||||
|
||||
if (k)
|
||||
|
|
Loading…
Reference in a new issue