X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_gfx.pas;h=a719ce69b0c6c21ccaa77bd025ea080e61b3ba1a;hb=1f3c760a3beb696acb34781fa305b10942aee2b1;hp=bd8d9ae5567495f7b857f9f3a77575c024d4596a;hpb=1c315223c6dbddff71a842f83a5bb1ef7ff5c6cb;p=d2df-sdl.git diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas index bd8d9ae..a719ce6 100644 --- a/src/game/g_gfx.pas +++ b/src/game/g_gfx.pas @@ -14,6 +14,7 @@ * along with this program. If not, see . *) {$INCLUDE ../shared/a_modes.inc} +{.$DEFINE D2F_DEBUG_FALL_MPLAT} unit g_gfx; interface @@ -171,9 +172,9 @@ begin awakeMinX := mapGrid.gridX0; awakeMinY := mapGrid.gridY0; SetLength(awakeMap, awakeMapW*awakeMapH); - {$IF DEFINED(D2F_DEBUG)} + //{$IF DEFINED(D2F_DEBUG)} e_LogWritefln('particle awake map: %sx%s (for grid of size %sx%s)', [awakeMapW, awakeMapH, mapGrid.gridWidth, mapGrid.gridHeight]); - {$ENDIF} + //{$ENDIF} awakeDirty := true; awmClear(); end; @@ -466,6 +467,9 @@ var ex, ey: Integer; checkEnv: Boolean; floorJustTraced: Boolean; + {$IF DEFINED(D2F_DEBUG_FALL_MPLAT)} + oldFloorY: Integer; + {$ENDIF} begin if not gpart_dbg_phys_enabled then goto _done; @@ -668,9 +672,16 @@ begin // check if our ground wasn't moved since the last scan if not floorJustTraced then begin - e_LogWritefln('force rescanning vpart at (%d,%d); floorY=%d', [x, y, floorY]); + {$IF DEFINED(D2F_DEBUG_FALL_MPLAT)} + oldFloorY := floorY; + {$ENDIF} findFloor(true); // force trace - e_LogWritefln(' rescanned vpart at (%d,%d); floorY=%d', [x, y, floorY]); + {$IF DEFINED(D2F_DEBUG_FALL_MPLAT)} + if (floorY <> oldFloorY) then + begin + e_LogWritefln('force rescanning vpart at (%s,%s); oldFloorY=%s; floorY=%s', [x, y, oldFloorY, floorY]); + end; + {$ENDIF} if (floorType = TFloorType.LiquidOut) then env := TEnvType.ELiquid else env := TEnvType.EAir; if (y <> floorY) then continue; end;