mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fix player taunt frequency (and there was much rejoicing)
This commit is contained in:
parent
979f40f900
commit
aba3e85c8e
1 changed files with 29 additions and 28 deletions
|
@ -1807,43 +1807,44 @@ void runlist_DamageEnemy(int nSprite, int nSprite2, short nDamage)
|
||||||
}
|
}
|
||||||
|
|
||||||
short nRun = sprite[nSprite].owner;
|
short nRun = sprite[nSprite].owner;
|
||||||
|
|
||||||
if (nRun <= -1) {
|
if (nRun <= -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
short nPreCreaturesLeft = nCreaturesLeft;
|
||||||
|
|
||||||
runlist_SendMessageToRunRec(nRun, (nSprite2 & 0xFFFF) | 0x80000, nDamage * 4);
|
runlist_SendMessageToRunRec(nRun, (nSprite2 & 0xFFFF) | 0x80000, nDamage * 4);
|
||||||
|
|
||||||
if (nCreaturesLeft <= 0) {
|
// is there now one less creature? (has one died)
|
||||||
return;
|
if (nPreCreaturesLeft > nCreaturesLeft)
|
||||||
}
|
|
||||||
|
|
||||||
if (sprite[nSprite2].statnum != 100) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
short nPlayer = GetPlayerFromSprite(nSprite2);
|
|
||||||
nTauntTimer[nPlayer]--;
|
|
||||||
|
|
||||||
if (nTauntTimer[nPlayer] <= 0)
|
|
||||||
{
|
{
|
||||||
// Do a taunt
|
if (sprite[nSprite2].statnum != 100) {
|
||||||
int nPlayerSprite = PlayerList[nPlayer].nSprite;
|
return;
|
||||||
int nSector = sprite[nPlayerSprite].sectnum;
|
|
||||||
|
|
||||||
if (!(SectFlag[nSector] & kSectUnderwater))
|
|
||||||
{
|
|
||||||
int ebx = 0x4000;
|
|
||||||
|
|
||||||
if (nPlayer == nLocalPlayer) {
|
|
||||||
ebx = 0x6000;
|
|
||||||
}
|
|
||||||
|
|
||||||
int nDopSprite = nDoppleSprite[nPlayer];
|
|
||||||
D3PlayFX(StaticSound[kSoundTauntStart + (RandomSize(3) % 5)], nDopSprite | ebx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nTauntTimer[nPlayer] = RandomSize(3) + 3;
|
short nPlayer = GetPlayerFromSprite(nSprite2);
|
||||||
|
nTauntTimer[nPlayer]--;
|
||||||
|
|
||||||
|
if (nTauntTimer[nPlayer] <= 0)
|
||||||
|
{
|
||||||
|
// Do a taunt
|
||||||
|
int nPlayerSprite = PlayerList[nPlayer].nSprite;
|
||||||
|
int nSector = sprite[nPlayerSprite].sectnum;
|
||||||
|
|
||||||
|
if (!(SectFlag[nSector] & kSectUnderwater))
|
||||||
|
{
|
||||||
|
int ebx = 0x4000;
|
||||||
|
|
||||||
|
if (nPlayer == nLocalPlayer) {
|
||||||
|
ebx = 0x6000;
|
||||||
|
}
|
||||||
|
|
||||||
|
int nDopSprite = nDoppleSprite[nPlayer];
|
||||||
|
D3PlayFX(StaticSound[kSoundTauntStart + (RandomSize(3) % 5)], nDopSprite | ebx);
|
||||||
|
}
|
||||||
|
|
||||||
|
nTauntTimer[nPlayer] = RandomSize(3) + 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
END_PS_NS
|
END_PS_NS
|
||||||
|
|
Loading…
Reference in a new issue