summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34e1c50)
raw | patch | inline | side by side (parent: 34e1c50)
author | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 11 Mar 2023 08:13:35 +0000 (18:13 +1000) | ||
committer | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 11 Mar 2023 08:13:35 +0000 (18:13 +1000) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 19d6be55027fbad4ea488a2915b2d034f5a464e0..38bb86a299228cfdd06c61bf01973c1aad915da4 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
procedure TPlayer.NetFire(Wpn: Byte; X, Y, AX, AY: Integer; WID: Integer = -1);
var
locObj: TObj;
- F: Boolean;
+ visible: Boolean = True;
WX, WY, XD, YD: Integer;
begin
- F := False;
WX := X;
WY := Y;
XD := AX;
case FCurrWeap of
WEAPON_KASTET:
begin
+ visible := False;
DoPunch();
if R_BERSERK in FRulez then
begin
FSawSoundSelect.Stop();
FSawSound.PlayAt(FObj.X, FObj.Y);
end;
- f := True;
end;
WEAPON_PISTOL:
begin
g_Sound_PlayExAt('SOUND_WEAPON_FIREPISTOL', GameX, Gamey);
FFireAngle := FAngle;
- f := True;
g_Player_CreateShell(GameX+PLAYER_RECT_CX, GameY+PLAYER_RECT_CX,
GameVelX, GameVelY-2, SHELL_BULLET);
end;
begin
g_Sound_PlayExAt('SOUND_WEAPON_FIRESHOTGUN', Gamex, Gamey);
FFireAngle := FAngle;
- f := True;
FShellTimer := 10;
FShellType := SHELL_SHELL;
end;
begin
g_Sound_PlayExAt('SOUND_WEAPON_FIRESHOTGUN2', Gamex, Gamey);
FFireAngle := FAngle;
- f := True;
FShellTimer := 13;
FShellType := SHELL_DBLSHELL;
end;
begin
g_Sound_PlayExAt('SOUND_WEAPON_FIRECGUN', Gamex, Gamey);
FFireAngle := FAngle;
- f := True;
g_Player_CreateShell(GameX+PLAYER_RECT_CX, GameY+PLAYER_RECT_CX,
GameVelX, GameVelY-2, SHELL_BULLET);
end;
begin
g_Weapon_Rocket(wx, wy, xd, yd, FUID, WID);
FFireAngle := FAngle;
- f := True;
end;
WEAPON_PLASMA:
begin
g_Weapon_Plasma(wx, wy, xd, yd, FUID, WID);
FFireAngle := FAngle;
- f := True;
end;
WEAPON_BFG:
begin
g_Weapon_BFGShot(wx, wy, xd, yd, FUID, WID);
FFireAngle := FAngle;
- f := True;
end;
WEAPON_SUPERPULEMET:
begin
g_Sound_PlayExAt('SOUND_WEAPON_FIRESHOTGUN', Gamex, Gamey);
FFireAngle := FAngle;
- f := True;
g_Player_CreateShell(GameX+PLAYER_RECT_CX, GameY+PLAYER_RECT_CX,
GameVelX, GameVelY-2, SHELL_SHELL);
end;
g_Weapon_flame(wx, wy, xd, yd, FUID, WID);
FlamerOn;
FFireAngle := FAngle;
- f := True;
end;
end;
- if not f then Exit;
+ if not visible then Exit;
if (FAngle = 0) or (FAngle = 180) then SetAction(A_ATTACK)
else if (FAngle = ANGLE_LEFTDOWN) or (FAngle = ANGLE_RIGHTDOWN) then SetAction(A_ATTACKDOWN)