summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1a0dedd)
raw | patch | inline | side by side (parent: 1a0dedd)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 3 Sep 2017 15:41:03 +0000 (18:41 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 3 Sep 2017 17:06:19 +0000 (20:06 +0300) |
src/game/g_gfx.pas | patch | blob | history |
diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas
index e49a72cdaf286758c9a048d96a40b7e26259f3bd..8bdbf88400547702ff9f29aff9e964f1e15d2276 100644 (file)
--- a/src/game/g_gfx.pas
+++ b/src/game/g_gfx.pas
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