summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 281969a)
raw | patch | inline | side by side (parent: 281969a)
author | Stas'M <x86corez@gmail.com> | |
Thu, 31 Jan 2019 20:04:01 +0000 (23:04 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Thu, 31 Jan 2019 20:04:01 +0000 (23:04 +0300) |
src/game/g_monsters.pas | patch | blob | history | |
src/game/g_netmsg.pas | patch | blob | history | |
src/game/g_player.pas | patch | blob | history | |
src/game/g_weapons.pas | patch | blob | history |
index 12488d6e1c69aedad84bdaf0207800bf6a479347..83714cbdd0ec333d5f9a581bfd35c78aae655fd5 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
st := g_Obj_Move(@FObj, fall, True, True);
positionChanged(); // this updates spatial accelerators
+// Åñëè ãîðèì - ïîäæèãàåì äðóãèõ ìîíñòðîâ:
+ if FFireTime > 0 then
+ for a := 0 to High(gMonsters) do
+ if (gMonsters[a] <> nil) and (gMonsters[a].alive) and
+ (gMonsters[a].FUID <> FUID) and
+ g_Obj_Collide(@FObj, @gMonsters[a].Obj) then
+ gMonsters[a].CatchFire(FFireAttacker);
+
// Âûëåòåë çà êàðòó - óäàëÿåì è çàïóñêàåì òðèããåðû:
if WordBool(st and MOVE_FALLOUT) or (FObj.X < -1000) or
(FObj.X > gMapInfo.Width+1000) or (FObj.Y < -1000) then
procedure TMonster.CatchFire(Attacker: Word);
begin
+ if FFireTime <= 0 then
+ g_Sound_PlayExAt('SOUND_IGNITE', FObj.X, FObj.Y);
FFireTime := 100;
FFireAttacker := Attacker;
if g_Game_IsNet and g_Game_IsServer then MH_SEND_MonsterState(FUID);
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index a060162f5460e7f36908a324c9eb0853cd12de54..6e825fe1215744d3b12123fc1045065e50d26a53 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
var
PID: Word;
Pl: TPlayer;
- I: Integer;
+ I, OldFire: Integer;
OldJet, Flam: Boolean;
NewTeam: Byte;
begin
FNoRespawn := M.ReadByte() <> 0;
OldJet := FJetpack;
FJetpack := M.ReadByte() <> 0;
+ OldFire := FFireTime;
FFireTime := M.ReadLongInt();
+ if (OldFire <= 0) and (FFireTime > 0) then
+ g_Sound_PlayExAt('SOUND_IGNITE', Obj.X, Obj.Y);
Flam := M.ReadByte() <> 0;
if OldJet and not FJetpack then
JetpackOff
procedure MC_RECV_MonsterState(var M: TMsg);
var
- ID: Integer;
+ ID, OldFire: Integer;
MState, MFAnm: Byte;
Mon: TMonster;
AnimRevert: Boolean;
MonsterAmmo := M.ReadLongInt();
MonsterPain := M.ReadLongInt();
AnimRevert := M.ReadByte() <> 0;
+ OldFire := FFireTime;
FFireTime := M.ReadLongInt();
+ if (OldFire <= 0) and (FFireTime > 0) then
+ g_Sound_PlayExAt('SOUND_IGNITE', Obj.X, Obj.Y);
RevertAnim(AnimRevert);
if MonsterState <> MState then
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 5d1f863faa686c667ec21470ffed524e700c4778..9605c6de6e1a3c9c97b6b14165941b866023fb87 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
procedure TPlayer.CatchFire(Attacker: Word);
begin
+ if FFireTime <= 0 then
+ g_Sound_PlayExAt('SOUND_IGNITE', FObj.X, FObj.Y);
FFireTime := 100;
FFireAttacker := Attacker;
if g_Game_IsNet and g_Game_IsServer then
diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 5505731729eb497613804cd78aa72d00886d96c8..21b206127a34928f44cb9c90de0fd5adcbfc570b 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
g_Sound_CreateWADEx('SOUND_WEAPON_FIRECGUN', GameWAD+':SOUNDS\FIRECGUN');
g_Sound_CreateWADEx('SOUND_WEAPON_FIREBFG', GameWAD+':SOUNDS\FIREBFG');
g_Sound_CreateWADEx('SOUND_FIRE', GameWAD+':SOUNDS\FIRE');
+ g_Sound_CreateWADEx('SOUND_IGNITE', GameWAD+':SOUNDS\IGNITE');
g_Sound_CreateWADEx('SOUND_WEAPON_STARTFIREBFG', GameWAD+':SOUNDS\STARTFIREBFG');
g_Sound_CreateWADEx('SOUND_WEAPON_EXPLODEROCKET', GameWAD+':SOUNDS\EXPLODEROCKET');
g_Sound_CreateWADEx('SOUND_WEAPON_EXPLODEBFG', GameWAD+':SOUNDS\EXPLODEBFG');
g_Sound_Delete('SOUND_WEAPON_FIRECGUN');
g_Sound_Delete('SOUND_WEAPON_FIREBFG');
g_Sound_Delete('SOUND_FIRE');
+ g_Sound_Delete('SOUND_IGNITE');
g_Sound_Delete('SOUND_WEAPON_STARTFIREBFG');
g_Sound_Delete('SOUND_WEAPON_EXPLODEROCKET');
g_Sound_Delete('SOUND_WEAPON_EXPLODEBFG');