diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas
index e96350ebad5d913f5aab3ca4da94d85074916c9b..d6244b7561687a9bcea64545a8adde9873ef0ccc 100644 (file)
--- a/src/game/g_gfx.pas
+++ b/src/game/g_gfx.pas
STATE_STICK = 2;
var
- Particles: Array of TParticle;
- OnceAnims: Array of TOnceAnim;
+ Particles: array of TParticle;
+ OnceAnims: array of TOnceAnim;
MaxParticles: Integer;
CurrentParticle: Integer;
begin
Particles := nil;
SetLength(Particles, MaxParticles);
+ for a := 0 to High(Particles) do Particles[a].State := STATE_FREE;
CurrentParticle := 0;
if OnceAnims <> nil then
end;
procedure g_GFX_SetMax(Count: Integer);
+var
+ a: Integer;
begin
- if Count > 50000 then
- Count := 50000;
+ if Count > 50000 then Count := 50000;
+ if (Count < 1) then Count := 1;
SetLength(Particles, Count);
+ for a := 0 to High(Particles) do Particles[a].State := STATE_FREE;
MaxParticles := Count;
- if CurrentParticle >= Count then
+ //if CurrentParticle >= Count then
CurrentParticle := 0;
end;