X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_gfx.pas;h=e49a72cdaf286758c9a048d96a40b7e26259f3bd;hb=3f758d569aeb250474aece9c4051f05ad7362805;hp=593613e79e07c3f636746a793f63606c3761d859;hpb=893195f9175217d24f3406080e36e3e1a4444fbd;p=d2df-sdl.git diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas index 593613e..e49a72c 100644 --- a/src/game/g_gfx.pas +++ b/src/game/g_gfx.pas @@ -857,20 +857,19 @@ 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; + if (pan <> nil) then continue; + env := TEnvType.EAir; // color case color of