From d807a4f36f5cc3cbdb5050af5a6a279277c74b18 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Sat, 2 Sep 2017 23:20:30 +0300 Subject: [PATCH] particles: water cosmetix --- src/game/g_gfx.pas | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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 -- 2.29.2