diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 2b38de319c037678141d76fbbd67259ceafaa92c..8fdde869c0bcda1b9a175a3805bc0c2bc528be53 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
uses
SysUtils, Classes, mempool,
- g_animations, g_basic, g_phys, xprofiler;
+ g_basic, g_phys, xprofiler;
type
SpawnerUID: Word;
Triggers: DWArray;
Obj: TObj;
- Animation: TAnimState;
+ time: LongWord;
Timeout: DWORD;
Stopped: Byte;
SetLength(Shots, find_id + 64)
end;
+ shots[find_id].time := gTime;
+
case ShotType of
WEAPON_ROCKETLAUNCHER:
begin
Triggers := nil;
ShotType := WEAPON_ROCKETLAUNCHER;
- Animation.Invalidate;
end;
end;
Triggers := nil;
ShotType := WEAPON_PLASMA;
- Animation := TAnimState.Create(True, 5, 2); // !!! put values into table
end;
end;
Triggers := nil;
ShotType := WEAPON_BFG;
- Animation := TAnimState.Create(True, 6, 2); // !!! put values into table
end;
end;
Triggers := nil;
ShotType := WEAPON_FLAMETHROWER;
- Animation.Invalidate;
- // Animation := TAnimState.Create(True, 6, 0); // drawed as gfx
end;
end;
Triggers := nil;
ShotType := WEAPON_IMP_FIRE;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
end;
end;
Triggers := nil;
ShotType := WEAPON_CACO_FIRE;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
end;
end;
Triggers := nil;
ShotType := WEAPON_MANCUB_FIRE;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
end;
end;
Triggers := nil;
ShotType := WEAPON_BARON_FIRE;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
end;
end;
Triggers := nil;
ShotType := WEAPON_BSP_FIRE;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
end;
end;
Triggers := nil;
ShotType := WEAPON_SKEL_FIRE;
target := TargetUID;
- Animation := TAnimState.Create(True, 5, 2); // !!! put values into table
end;
end;
end;
ShotType := WEAPON_ROCKETLAUNCHER;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 12);
- Animation.Invalidate;
triggers := nil;
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
triggers := nil;
target := TargetUID;
- Animation := TAnimState.Create(True, 5, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
- Animation := TAnimState.Create(True, 5, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
- Animation.Invalidate;
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
-
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
-
- Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
throw(find_id, x+dx, y+dy, xd+dx, yd+dy, 16);
triggers := nil;
- Animation := TAnimState.Create(True, 6, 2); // !!! put values into table
+ time := gTime;
end;
Shots[find_id].SpawnerUID := SpawnerUID;
end;
end;
- // Àíèìàöèÿ ñíàðÿäà:
- if Animation.IsValid() then
- Animation.Update();
-
// Äâèæåíèå:
spl := (ShotType <> WEAPON_PLASMA) and
(ShotType <> WEAPON_BFG) and
begin
// Íà êëèåíòå ñêîðåå âñåãî è òàê óæå âûïàë.
ShotType := 0;
- Animation.Invalidate();
+ time := 0;
Continue;
end;
begin
if gGameSettings.GameType = GT_SERVER then
MH_SEND_DeleteShot(i, Obj.X, Obj.Y, Loud);
- Animation.Invalidate;
+ time := 0;
end
else if (ShotType <> WEAPON_FLAMETHROWER) and ((oldvx <> Obj.Vel.X) or (oldvy <> Obj.Vel.Y)) then
if gGameSettings.GameType = GT_SERVER then
// Êîñòûëèíà åáàíàÿ
Shots[i].Stopped := utils.readByte(st);
- // Óñòàíîâêà òåêñòóðû èëè àíèìàöèè
- Shots[i].Animation.Invalidate;
-
- case Shots[i].ShotType of
- WEAPON_ROCKETLAUNCHER, WEAPON_SKEL_FIRE:
- begin
- end;
- WEAPON_PLASMA:
- begin
- Shots[i].Animation := TAnimState.Create(True, 5, 2); // !!! put values into table
- end;
- WEAPON_BFG:
- begin
- Shots[i].Animation := TAnimState.Create(True, 6, 2); // !!! put values into table
- end;
- WEAPON_IMP_FIRE:
- begin
- Shots[i].Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
- end;
- WEAPON_BSP_FIRE:
- begin
- Shots[i].Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
- end;
- WEAPON_CACO_FIRE:
- begin
- Shots[i].Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
- end;
- WEAPON_BARON_FIRE:
- begin
- Shots[i].Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
- end;
- WEAPON_MANCUB_FIRE:
- begin
- Shots[i].Animation := TAnimState.Create(True, 4, 2); // !!! put values into table
- end;
- end;
+ Shots[i].time := gTime; // TODO save time?
end;
end;
end; // case ShotType of...
ShotType := 0;
- Animation.Invalidate;
end;
end;