From: Ketmar Dark Date: Sun, 3 Sep 2017 15:41:03 +0000 (+0300) Subject: particle cosmetix for mplats X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=bab60f8ad58f03e8a35dbb44aba77bb9ff9201f9;p=d2df-sdl.git particle cosmetix for mplats --- diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas index e49a72c..8bdbf88 100644 --- a/src/game/g_gfx.pas +++ b/src/game/g_gfx.pas @@ -358,20 +358,24 @@ end; procedure TParticle.think (); inline; + procedure awake (); + begin + state := TPartState.Normal; + floorY := Unknown; + ceilingY := Unknown; + if (velY = 0) then velY := 0.1; + if (accelY = 0) then accelY := 0.5; + end; + begin // awake sleeping particle, if necessary if awakeDirty then begin case state of TPartState.Sleeping, TPartState.Stuck: - if awmIsSet(x, y) then - begin - state := TPartState.Normal; - floorY := Unknown; - ceilingY := Unknown; - if (velY = 0) then velY := 0.1; - if (accelY = 0) then accelY := 0.5; - end; + if awmIsSet(x, y) then awake(); + else + if (env = TEnvType.EWall) and awmIsSet(x, y) then awake(); end; end; case particleType of