- stop screaming sound when landing.

Fixes #116
This commit is contained in:
Christoph Oelckers 2020-08-07 22:20:29 +02:00
parent 596367f10f
commit dfa3519ebc
4 changed files with 11 additions and 8 deletions

View file

@ -1676,11 +1676,13 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
if (p->poszv > 2400 && p->falling_counter < 255)
{
p->falling_counter++;
if (p->falling_counter == 38)
p->scream_voice = S_PlayActorSound(DUKE_SCREAM, pi);
if (p->falling_counter == 38 && !S_CheckActorSoundPlaying(pi, DUKE_SCREAM))
S_PlayActorSound(DUKE_SCREAM, pi);
}
if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground
{
S_StopSound(DUKE_SCREAM, pi);
if (sector[p->cursectnum].lotag != 1)
{
if (p->falling_counter > 62) quickkill(p);
@ -1704,6 +1706,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
}
else if (p->poszv > 2048) S_PlayActorSound(DUKE_LAND, pi);
}
}
}
}

View file

@ -2176,15 +2176,17 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
if (p->poszv > 2400 && p->falling_counter < 255)
{
p->falling_counter++;
if (p->falling_counter == 38)
p->scream_voice = S_PlayActorSound(DUKE_SCREAM, pi);
if (p->falling_counter == 38 && !S_CheckActorSoundPlaying(pi, DUKE_SCREAM))
S_PlayActorSound(DUKE_SCREAM, pi);
}
if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground
{
S_StopSound(DUKE_SCREAM, pi);
if (sector[p->cursectnum].lotag != 1)
{
if (isRRRA()) p->MotoOnGround = 1;
if (p->falling_counter > 62 || (isRRRA() && p->falling_counter > 2 && sector[p->cursectnum].lotag == 802))
if (p->falling_counter > 62 || (isRRRA() && p->falling_counter > 2 && sector[p->cursectnum].lotag == 802))
quickkill(p);
else if (p->falling_counter > 9)
@ -2220,6 +2222,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
p->TurbCount = 12;
}
}
}
}
}

View file

@ -208,7 +208,6 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
("last_full_weapon", w.last_full_weapon)
("footprintshade", w.footprintshade)
("boot_amount", w.boot_amount)
("scream_voice", w.scream_voice)
("gm", w.gm)
("on_warping_sector", w.on_warping_sector)
("footprintcount", w.footprintcount)

View file

@ -160,8 +160,6 @@ struct player_struct
short holoduke_on, pycount, frag_ps;
short transporter_hold, last_full_weapon, footprintshade, boot_amount;
int scream_voice;
unsigned char gm;
unsigned char on_warping_sector, footprintcount;
unsigned char hbomb_on, jumping_toggle, rapid_fire_hold, on_ground;