summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 37c826b)
raw | patch | inline | side by side (parent: 37c826b)
author | Stas'M <x86corez@gmail.com> | |
Sat, 19 May 2018 23:43:27 +0000 (02:43 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Sat, 19 May 2018 23:44:03 +0000 (02:44 +0300) |
http://doom2d.org/forum/viewtopic.php?f=36&t=1885
src/game/g_monsters.pas | patch | blob | history |
index e496521d4485a3ada649639ff4b7ebec96ae0bcf..f64850d987b63ac67334ff6b6a78d3118b8cc19f 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
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: