X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_monsters.pas;h=ae4389c98ab48bb4b9c79c15ab9d8607de8967c2;hb=d3ce22f70dfe266676a3fb95d5193238ff5b9e72;hp=2b70da642e49892257507eadf3da63de2a0d32db;hpb=3516de10abfb25aa9560228ffc0180a98f0f7ab2;p=d2df-sdl.git diff --git a/src/game/g_monsters.pas b/src/game/g_monsters.pas index 2b70da6..ae4389c 100644 --- a/src/game/g_monsters.pas +++ b/src/game/g_monsters.pas @@ -14,6 +14,7 @@ * along with this program. If not, see . *) {$INCLUDE ../shared/a_modes.inc} +{$M+} {.$DEFINE D2F_DEBUG_MONS_MOVE} unit g_monsters; @@ -136,6 +137,13 @@ type procedure getMapBox (out x, y, w, h: Integer); inline; + public + property Obj: TObj read FObj; + + property proxyId: Integer read mProxyId; + property arrIdx: Integer read mArrIdx; + + published property MonsterType: Byte read FMonsterType; property MonsterHealth: Integer read FHealth write FHealth; property MonsterAmmo: Integer read FAmmo write FAmmo; @@ -148,7 +156,6 @@ type property MonsterPain: Integer read FPain write FPain; property MonsterAnim: Byte read FCurAnim write FCurAnim; - property Obj: TObj read FObj; property UID: Word read FUID write FUID; property SpawnTrigger: Integer read FSpawnTrigger write FSpawnTrigger; @@ -161,9 +168,6 @@ type property GameDirection: TDirection read FDirection write FDirection; property StartID: Integer read FStartID; - - property proxyId: Integer read mProxyId; - property arrIdx: Integer read mArrIdx; end; @@ -452,8 +456,8 @@ const LeftAnim: Boolean; wX, wY: Integer; // Îòêóäà âûëåòèò ïóëÿ AnimSpeed: Array [ANIM_SLEEP..ANIM_PAIN] of Byte; - AnimDeltaRight: Array [ANIM_SLEEP..ANIM_PAIN] of TPoint; - AnimDeltaLeft: Array [ANIM_SLEEP..ANIM_PAIN] of TPoint; + AnimDeltaRight: Array [ANIM_SLEEP..ANIM_PAIN] of TDFPoint; + AnimDeltaLeft: Array [ANIM_SLEEP..ANIM_PAIN] of TDFPoint; end = // SLEEP GO DIE MESS ATTACK ATTACK2 PAIN ((LeftAnim: False; wX: 54; wY: 32; AnimSpeed:(3, 2, 3, 2, 3, 0, 4); //DEMON AnimDeltaRight: ((X: 1; Y: 4), (X: 1; Y: 4), (X: 0; Y: 4), (X: 0; Y: 4), (X: 2; Y: 6), (X: 2; Y: 6), (X: 2; Y: 5)); @@ -2051,9 +2055,12 @@ begin o.Y+o.Rect.Y+o.Rect.Height-128, M_NONE); // Íå â îáëàñòè ðèñîâàíèÿ íå ðåñóåì: - if not g_Collide(FObj.X+FObj.Rect.X, FObj.Y+FObj.Rect.Y, FObj.Rect.Width, FObj.Rect.Height, - sX-128, sY-128, sWidth+256, sHeight+256) then - Exit; + if (g_dbg_scale = 1.0) then + begin + if not g_Collide(FObj.X+FObj.Rect.X, FObj.Y+FObj.Rect.Y, FObj.Rect.Width, FObj.Rect.Height, + sX-128, sY-128, sWidth+256, sHeight+256) then + Exit; + end; // Ýòè ìîíñòðû, óìèðàÿ, íå îñòàâëÿþò òðóïîâ: if FState = MONSTATE_DEAD then