play crouch/uncrouch sound once

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3485 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-11-10 13:31:20 +00:00
parent 3c683babb0
commit e8d1c2df1c
2 changed files with 8 additions and 3 deletions
+7 -3
View File
@@ -595,9 +595,12 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
else if(pl->inwater && !water) playsound(S_SPLASH1, &pl->o);
pl->inwater = water;
}
// Added by Rick: Easy hack to store previous locations of all players/monsters/bots
if(pl->type==ENT_PLAYER || pl->type==ENT_BOT) ((playerent *)pl)->history.update(pl->o, lastmillis);
// End add
// store previous locations of all players/bots
if(pl->type==ENT_PLAYER || pl->type==ENT_BOT)
{
((playerent *)pl)->history.update(pl->o, lastmillis);
}
// apply volume-resize when crouching
if(pl->type==ENT_PLAYER)
@@ -713,6 +716,7 @@ void crouch(bool on)
{
if(player1->isspectating()) return;
player1->trycrouch = on;
playsoundc(player1->crouching ? S_CROUCH : S_UNCROUCH);
}
COMMAND(backward, ARG_DOWN);