index e496521d4485a3ada649639ff4b7ebec96ae0bcf..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
// Ðûáà ïëûâåò ââåðõ:
if FObj.Vel.Y < 0 then
- if not g_Obj_CollideWater(@FObj, 0, -16) then
+ if not g_Obj_CollideLiquid(@FObj, 0, -16) then
begin
// Âñïëûëè äî ïîâåðõíîñòè - ñòîï:
FObj.Vel.Y := 0;
wx := FObj.X + wx;
wy := FObj.Y + MONSTER_ANIMTABLE[FMonsterType].wY;
+ // Ìîíñòð íå ìîæåò öåëèòüñÿ â îáúåêò çà ñïèíîé, ñòðåëÿÿ âëåâî:
+ if (FDirection = TDirection.D_LEFT) and (tx > wx) then
+ begin
+ tx := wx - 32;
+ ty := wy + Random(11) - 5;
+ end;
+ // È àíàëîãè÷íî, ñòðåëÿÿ âïðàâî:
+ if (FDirection = TDirection.D_RIGHT) and (tx < wx) then
+ begin
+ tx := wx + 32;
+ ty := wy + Random(11) - 5;
+ end;
+
// Äåëàåì âûñòðåë íóæíûì îðóæèåì:
case FMonsterType of
MONSTER_IMP:
// Ðûáà ïëûâåò ââåðõ:
if FObj.Vel.Y < 0 then
- if not g_Obj_CollideWater(@FObj, 0, -16) then
+ if not g_Obj_CollideLiquid(@FObj, 0, -16) then
begin
// Âñïëûëè äî ïîâåðõíîñòè - ñòîï:
FObj.Vel.Y := 0;
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);