X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_monsters.pas;h=12488d6e1c69aedad84bdaf0207800bf6a479347;hb=6560a7fbc09aaefc7dea42de78d4336bbb42b532;hp=e496521d4485a3ada649639ff4b7ebec96ae0bcf;hpb=331297e82162a6acd3e9e07605368e329ce66105;p=d2df-sdl.git diff --git a/src/game/g_monsters.pas b/src/game/g_monsters.pas index e496521..12488d6 100644 --- a/src/game/g_monsters.pas +++ b/src/game/g_monsters.pas @@ -2825,7 +2825,7 @@ begin // Ðûáà ïëûâåò ââåðõ: 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; @@ -3243,6 +3243,19 @@ _end: 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: @@ -3661,7 +3674,7 @@ begin // Ðûáà ïëûâåò ââåðõ: 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;