From: Ketmar Dark Date: Sat, 2 Sep 2017 20:20:30 +0000 (+0300) Subject: particles: water cosmetix X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=d807a4f36f5cc3cbdb5050af5a6a279277c74b18;p=d2df-sdl.git particles: water cosmetix --- diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas index 593613e..47c638c 100644 --- a/src/game/g_gfx.pas +++ b/src/game/g_gfx.pas @@ -857,20 +857,18 @@ begin // check for level bounds if (x < g_Map_MinX) or (y < g_Map_MinY) or (x > g_Map_MaxX) or (y > g_Map_MaxY) then continue; - // in what environment we are starting in? - pan := g_Map_PanelAtPoint(x, y, (GridTagObstacle or GridTagLiquid)); - if (pan <> nil) then + // this hack will allow water spawned in water to fly out + // it can happen when player fell from a huge height (see "DOOM2D.WAD:\MAP03", for example) + if (fVelY >= 0) then begin - // either in a wall, or in a liquid - //if ((pan.tag and GridTagObstacle) <> 0) then continue; // don't spawn in walls - //env := TEnvType.ELiquid; - //continue; - env := TEnvType.EAir; + // in what environment we are starting in? + pan := g_Map_PanelAtPoint(x, y, (GridTagObstacle or GridTagLiquid)); end else begin - env := TEnvType.EAir; + pan := g_Map_PanelAtPoint(x, y, GridTagObstacle); end; + env := TEnvType.EAir; // color case color of