summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 081ca9c)
raw | patch | inline | side by side (parent: 081ca9c)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 19 Aug 2017 13:27:32 +0000 (16:27 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sat, 19 Aug 2017 13:28:00 +0000 (16:28 +0300) |
src/game/g_basic.pas | patch | blob | history | |
src/game/g_map.pas | patch | blob | history |
diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas
index 67285caa60e8cb5349cdd9f606ca1a66dc7f70ca..2c540aad0a617fc7c2c51f3bc8060e7e4d057861 100644 (file)
--- a/src/game/g_basic.pas
+++ b/src/game/g_basic.pas
end;
function g_CollideLevel(X, Y: Integer; Width, Height: Word): Boolean;
+begin
+ result := g_Map_CollidePanel(X, Y, Width, Height, (PANEL_WALL or PANEL_CLOSEDOOR or PANEL_OPENDOOR), false);
+end;
+(*
var
a: Integer;
begin
Exit;
end;
end;
+*)
function g_CollidePlayer(X, Y: Integer; Width, Height: Word): Boolean;
var
diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index 2f1e856f7ae6a5be6a91ee40023915197504fef2..f3e15a21ef10847f71df7a34d342ff75b3dece9b 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
@@ -2181,7 +2181,7 @@ function g_Map_CollidePanel(X, Y: Integer; Width, Height: Word; PanelType: Word;
var
tagmask: Integer = 0;
begin
- if WordBool(PanelType and PANEL_WALL) then tagmask := tagmask or GridTagWall or GridTagDoor;
+ if WordBool(PanelType and (PANEL_WALL or PANEL_CLOSEDOOR or PANEL_OPENDOOR)) then tagmask := tagmask or (GridTagWall or GridTagDoor);
if WordBool(PanelType and PANEL_WATER) then tagmask := tagmask or GridTagWater;
if WordBool(PanelType and PANEL_ACID1) then tagmask := tagmask or GridTagAcid1;
if WordBool(PanelType and PANEL_ACID2) then tagmask := tagmask or GridTagAcid2;