mirror of
https://github.com/UberGames/ioef.git
synced 2025-01-18 23:21:37 +00:00
Fix CGame CG_WaterLevel() comparisons
My last commit made it so that CGame "waterlevel 1" is feet in water, but before it was erroneously about waist deep in water. The places where it is checked it is suppose to be view position underwater. Change comparisons to use correct value for view position underwater.
This commit is contained in:
parent
08ac364cd6
commit
386a00fc2b
1 changed files with 2 additions and 2 deletions
|
@ -494,7 +494,7 @@ void CG_PainEvent( centity_t *cent, int health ) {
|
|||
snd = "*pain100_1.wav";
|
||||
}
|
||||
// play a gurp sound instead of a normal pain sound
|
||||
if (CG_WaterLevel(cent) >= 1) {
|
||||
if (CG_WaterLevel(cent) == 3) {
|
||||
if (rand()&1) {
|
||||
trap_S_StartSound(NULL, cent->currentState.number, CHAN_VOICE, CG_CustomSound(cent->currentState.number, "sound/player/gurp1.wav"));
|
||||
} else {
|
||||
|
@ -1169,7 +1169,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
case EV_DEATH3:
|
||||
DEBUGNAME("EV_DEATHx");
|
||||
|
||||
if (CG_WaterLevel(cent) >= 1) {
|
||||
if (CG_WaterLevel(cent) == 3) {
|
||||
trap_S_StartSound(NULL, es->number, CHAN_VOICE, CG_CustomSound(es->number, "*drown.wav"));
|
||||
} else {
|
||||
trap_S_StartSound(NULL, es->number, CHAN_VOICE, CG_CustomSound(es->number, va("*death%i.wav", event - EV_DEATH1 + 1)));
|
||||
|
|
Loading…
Reference in a new issue