diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index 7f7a459f36b81ee71918e293059f5f2abc9f3861..759f4b6bd963964b6c9d76524fd178902881091b 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
implementation
uses
implementation
uses
+ {$IFDEF ENABLE_MENU}
+ g_gui,
+ {$ENDIF}
Math, ENet, e_input, e_log, g_base, g_basic,
Math, ENet, e_input, e_log, g_base, g_basic,
- g_textures, g_gfx, g_sound, g_console, g_options, g_main,
- g_game, g_player, g_map, g_panel, g_items, g_weapons, g_phys, g_gui,
+ g_textures, g_gfx, g_sound, g_console, g_options,
+ g_game, g_player, g_map, g_panel, g_items, g_weapons, g_phys,
g_language, g_monsters, g_netmaster, utils, wadreader, MAPDEF;
const
g_language, g_monsters, g_netmaster, utils, wadreader, MAPDEF;
const
if (g_Force_Model_Get() <> 0) then
TmpModel := g_Forced_Model_GetName();
if (g_Force_Model_Get() <> 0) then
TmpModel := g_Forced_Model_GetName();
- if TmpModel <> Pl.Model.Name then
+ if TmpModel <> Pl.Model.GetName() then
Pl.SetModel(TmpModel);
if (TmpWeapSwitch <> Pl.WeapSwitchMode) then
Pl.SetModel(TmpModel);
if (TmpWeapSwitch <> Pl.WeapSwitchMode) then
NetOut.Write(PID);
NetOut.Write(Pl.Name);
if Mdl = '' then
NetOut.Write(PID);
NetOut.Write(Pl.Name);
if Mdl = '' then
- NetOut.Write(Pl.Model.Name)
+ NetOut.Write(Pl.Model.GetName())
else
NetOut.Write(Mdl);
NetOut.Write(Pl.FColor.R);
else
NetOut.Write(Mdl);
NetOut.Write(Pl.FColor.R);
Kind: Byte;
X, Y: Integer;
Ang: SmallInt;
Kind: Byte;
X, Y: Integer;
Ang: SmallInt;
- Anim: TAnimation;
- ID: LongWord;
begin
if not gGameOn then Exit;
Kind := M.ReadByte();
begin
if not gGameOn then Exit;
Kind := M.ReadByte();
NET_GFX_TELE:
begin
NET_GFX_TELE:
begin
- if g_Frames_Get(ID, 'FRAMES_TELEPORT') then
- begin
- Anim := TAnimation.Create(ID, False, 3);
- g_GFX_OnceAnim(X, Y, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_TELEPORT_FAST, X, Y);
if Ang = 1 then
g_Sound_PlayExAt('SOUND_GAME_TELEPORT', X, Y);
end;
NET_GFX_EXPLODE:
begin
if Ang = 1 then
g_Sound_PlayExAt('SOUND_GAME_TELEPORT', X, Y);
end;
NET_GFX_EXPLODE:
begin
- if g_Frames_Get(ID, 'FRAMES_EXPLODE_ROCKET') then
- begin
- Anim := TAnimation.Create(ID, False, 6);
- Anim.Blending := False;
- g_GFX_OnceAnim(X-64, Y-64, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_EXPLODE_ROCKET, X - 64, Y - 64);
if Ang = 1 then
g_Sound_PlayExAt('SOUND_WEAPON_EXPLODEROCKET', X, Y);
end;
NET_GFX_BFGEXPL:
begin
if Ang = 1 then
g_Sound_PlayExAt('SOUND_WEAPON_EXPLODEROCKET', X, Y);
end;
NET_GFX_BFGEXPL:
begin
- if g_Frames_Get(ID, 'FRAMES_EXPLODE_BFG') then
- begin
- Anim := TAnimation.Create(ID, False, 6);
- Anim.Blending := False;
- g_GFX_OnceAnim(X-64, Y-64, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_EXPLODE_BFG, X - 64, Y - 64);
if Ang = 1 then
g_Sound_PlayExAt('SOUND_WEAPON_EXPLODEBFG', X, Y);
end;
NET_GFX_BFGHIT:
begin
if Ang = 1 then
g_Sound_PlayExAt('SOUND_WEAPON_EXPLODEBFG', X, Y);
end;
NET_GFX_BFGHIT:
begin
- if g_Frames_Get(ID, 'FRAMES_BFGHIT') then
- begin
- Anim := TAnimation.Create(ID, False, 4);
- g_GFX_OnceAnim(X-32, Y-32, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_BFG_HIT, X - 32, Y - 32);
end;
NET_GFX_FIRE:
begin
end;
NET_GFX_FIRE:
begin
- if g_Frames_Get(ID, 'FRAMES_FIRE') then
- begin
- Anim := TAnimation.Create(ID, False, 4);
- g_GFX_OnceAnim(X, Y, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_FIRE, X, Y);
if Ang = 1 then
g_Sound_PlayExAt('SOUND_FIRE', X, Y);
end;
NET_GFX_RESPAWN:
begin
if Ang = 1 then
g_Sound_PlayExAt('SOUND_FIRE', X, Y);
end;
NET_GFX_RESPAWN:
begin
- if g_Frames_Get(ID, 'FRAMES_ITEM_RESPAWN') then
- begin
- Anim := TAnimation.Create(ID, False, 4);
- g_GFX_OnceAnim(X, Y, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_ITEM_RESPAWN, X, Y);
if Ang = 1 then
g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', X, Y);
end;
if Ang = 1 then
g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', X, Y);
end;
if (g_Force_Model_Get() <> 0) then
TmpModel := g_Forced_Model_GetName();
if (g_Force_Model_Get() <> 0) then
TmpModel := g_Forced_Model_GetName();
- if TmpModel <> Pl.Model.Name then
+ if TmpModel <> Pl.Model.GetName() then
Pl.SetModel(TmpModel);
end;
Pl.SetModel(TmpModel);
end;
procedure MC_RECV_ItemSpawn(var M: TMsg);
var
ID: Word;
procedure MC_RECV_ItemSpawn(var M: TMsg);
var
ID: Word;
- AID: DWord;
X, Y, VX, VY: Integer;
T: Byte;
Quiet, Fall{, Resp}: Boolean;
X, Y, VX, VY: Integer;
T: Byte;
Quiet, Fall{, Resp}: Boolean;
- Anim: TAnimation;
it: PItem;
begin
if not gGameOn then Exit;
it: PItem;
begin
if not gGameOn then Exit;
if not Quiet then
begin
g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', X, Y);
if not Quiet then
begin
g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', X, Y);
- if g_Frames_Get(AID, 'FRAMES_ITEM_RESPAWN') then
- begin
- Anim := TAnimation.Create(AID, False, 4);
- g_GFX_OnceAnim(X+(it.Obj.Rect.Width div 2)-16, Y+(it.Obj.Rect.Height div 2)-16, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_ITEM_RESPAWN, X+(it.Obj.Rect.Width div 2)-16, Y+(it.Obj.Rect.Height div 2)-16);
end;
end;
end;
end;
kByte := 0;
Predict := NetPredictSelf; // and (not NetGotKeys);
kByte := 0;
Predict := NetPredictSelf; // and (not NetGotKeys);
+{$IFDEF DISABLE_MENU}
+ if (not gConsoleShow) and (not gChatShow) then
+{$ELSE}
if (not gConsoleShow) and (not gChatShow) and (g_ActiveWindow = nil) then
if (not gConsoleShow) and (not gChatShow) and (g_ActiveWindow = nil) then
+{$ENDIF}
begin
strafeDir := P1MoveButton shr 4;
P1MoveButton := P1MoveButton and $0F;
begin
strafeDir := P1MoveButton shr 4;
P1MoveButton := P1MoveButton and $0F;