summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a057c2c)
raw | patch | inline | side by side (parent: a057c2c)
author | binarymaster <x86corez@gmail.com> | |
Wed, 1 Mar 2017 21:49:13 +0000 (00:49 +0300) | ||
committer | binarymaster <x86corez@gmail.com> | |
Wed, 1 Mar 2017 21:49:13 +0000 (00:49 +0300) |
src/game/g_monsters.pas | patch | blob | history |
index 85563aa8ec40597b94a4d030022cedc89544d1b4..cde1aad4dff139c91b8ffdf65997fa9ce4ba1a3e 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
FPain: Integer;
FSleep: Integer;
FPainSound: Boolean;
+ FPainTicks: Integer;
FWaitAttackAnim: Boolean;
FChainFire: Boolean;
tx, ty: Integer;
Exit;
FPainSound := True;
+ FPainTicks := 20;
case FMonsterType of
MONSTER_IMP, MONSTER_ZOMBY, MONSTER_SERG,
g_Sound_PlayExAt('SOUND_MONSTER_PAIN', FObj.X, FObj.Y);
MONSTER_SOUL, MONSTER_BARON, MONSTER_CACO,
MONSTER_KNIGHT, MONSTER_DEMON, MONSTER_SPIDER,
- MONSTER_CYBER:
+ MONSTER_BSP, MONSTER_CYBER:
g_Sound_PlayExAt('SOUND_MONSTER_PAIN2', FObj.X, FObj.Y);
MONSTER_VILE:
g_Sound_PlayExAt('SOUND_MONSTER_VILE_PAIN', FObj.X, FObj.Y);
Exit;
end;
- FPainSound := False;
+ if FPainTicks > 0 then
+ Dec(FPainTicks)
+ else
+ FPainSound := False;
// Äâèãàåìñÿ:
st := g_Obj_Move(@FObj, fall, True, True);
FPain := MONSTERTABLE[FMonsterType].Pain;
if gSoundEffectsDF then PainSound();
end;
+ if (not gSoundEffectsDF) and (FPain >= MONSTERTABLE[FMonsterType].MinPain) then
+ PainSound();
// Ñíèæàåì áîëü ñî âðåìåíåì:
FPain := FPain - 5;
Exit;
end;
- FPainSound := False;
+ if FPainTicks > 0 then
+ Dec(FPainTicks)
+ else
+ FPainSound := False;
// Äâèãàåìñÿ:
st := g_Obj_Move(@FObj, fall, True, True);
if FPain >= MONSTERTABLE[FMonsterType].Pain then
begin
FPain := MONSTERTABLE[FMonsterType].Pain;
- PainSound();
+ if gSoundEffectsDF then PainSound();
end;
+ if (not gSoundEffectsDF) and (FPain >= MONSTERTABLE[FMonsterType].MinPain) then
+ PainSound();
// Ñíèæàåì áîëü ñî âðåìåíåì:
FPain := FPain - 5;