summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d607bc)
raw | patch | inline | side by side (parent: 2d607bc)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 20 Aug 2017 06:20:15 +0000 (09:20 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 20 Aug 2017 07:47:56 +0000 (10:47 +0300) |
src/game/g_monsters.pas | patch | blob | history |
index 1f1e71183c52b302e6b3f33927bc405c799506c8..f5f69a93d5eea3b621a153db5d821dd334c49545 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
var
a: Integer;
begin
- for a := 0 to High(gMonsters) do gMonsters[a].Free();
monsTree.reset();
+ for a := 0 to High(gMonsters) do gMonsters[a].Free();
gMonsters := nil;
clearUidMap();
monCheckTrapLastFrameId := 0;
if (treeNode <> -1) then
begin
- {$IF DEFINED(D2F_DEBUG)}
- e_WriteLog(Format('monster #%d(%u): removed from tree; nodeid=%d', [arrIdx, UID, treeNode]), MSG_NOTIFY);
- {$ENDIF}
- if monsTree.isValidId(treeNode) then monsTree.removeObject(treeNode);
+ if monsTree.isValidId(treeNode) then
+ begin
+ {$IF DEFINED(D2F_DEBUG)}
+ e_WriteLog(Format('monster #%d(%u): removed from tree; nodeid=%d', [arrIdx, UID, treeNode]), MSG_NOTIFY);
+ {$ENDIF}
+ monsTree.removeObject(treeNode);
+ end;
end;
if (arrIdx <> -1) then