From: Ketmar Dark Date: Sat, 19 Aug 2017 13:27:32 +0000 (+0300) Subject: `g_basic.g_CollideLevel()` now using accelerated coldet X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=51343dcc874e5db55f029b0750892ca2da971c24;p=d2df-sdl.git `g_basic.g_CollideLevel()` now using accelerated coldet --- diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas index 67285ca..2c540aa 100644 --- a/src/game/g_basic.pas +++ b/src/game/g_basic.pas @@ -102,6 +102,10 @@ begin 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 @@ -121,6 +125,7 @@ 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 2f1e856..f3e15a2 100644 --- 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;