From: Ketmar Dark Date: Fri, 18 Aug 2017 18:37:33 +0000 (+0300) Subject: cosmetix X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=b27ddf64ad2a1e8aa1b0323022e9e5443503be4c;p=d2df-sdl.git cosmetix --- diff --git a/src/game/g_map.pas b/src/game/g_map.pas index b97cc00..7334c3e 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -202,14 +202,13 @@ var pan: TPanel; begin result := false; - if (flesh = nil) then exit; + if (flesh = nil) then begin aabb := AABB2D.Create(0, 0, 0, 0); exit; end; pan := (flesh as TPanel); - if (pan.Width < 1) or (pan.Height < 1) then exit; aabb := AABB2D.Create(pan.X, pan.Y, pan.X+pan.Width, pan.Y+pan.Height); + if (pan.Width < 1) or (pan.Height < 1) then exit; //if (pan.Width = 1) then aabb.maxX += 1; //if (pan.Height = 1) then aabb.maxY += 1; if not aabb.valid then raise Exception.Create('wutafuuuuuuu?!'); - //e_WriteLog(Format('getFleshAABB(%d;%d) AABB:(%f,%f)-(%f,%f); valid=%d; volume=%f; x=%d; y=%d; w=%d; h=%d', [pan.tag, pan.ArrIdx, aabb.minX, aabb.minY, aabb.maxX, aabb.maxY, Integer(aabb.valid), aabb.volume, pan.X, pan.Y, pan.Width, pan.Height]), MSG_NOTIFY); result := aabb.valid; end;