summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2587eb5)
raw | patch | inline | side by side (parent: 2587eb5)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 4 Jan 2019 19:58:37 +0000 (22:58 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 4 Jan 2019 19:58:37 +0000 (22:58 +0300) |
src/game/g_netmsg.pas | patch | blob | history | |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas
index e9cc68c2ee55ac7fcb0067073ed725ecdedd6e9e..f235035fbda6d740146eb383d07d4e66e740948f 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
writeln('HOST PLRPOS: got: currweap=', CurrWeap, '; curfrm=', gTime, '; netweap=', newweapon, '; oldweap=', CurrWeap);
{$ENDIF}
//NetForceWeap := newweapon;
- SetWeaponHost(newweapon);
+ SetWeapon(newweapon);
end;
//e_WriteLog(Format('R:ws=%d', [WeaponSelect]), MSG_WARNING);
if Direction <> TDirection(Dir) then
if (gTime >= NetForceWeapFIdx) then
begin
//NetForceWeap := newweapon;
- SetWeaponHost(newweapon);
+ SetWeapon(newweapon);
end;
//SetWeapon(M.ReadByte());
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 9351a9d38b6937455c5f9d50233b4f0ca071cbc4..c9a640682a1d0cfea8ad3c6cfb6dcdd45a91155f 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
procedure ReleaseKeysNoWeapon();
procedure SetModel(ModelName: String);
procedure SetColor(Color: TRGB);
- procedure SetWeaponHost(W: Byte);
+ procedure SetWeapon(W: Byte);
function IsKeyPressed(K: Byte): Boolean;
function GetKeys(): Byte;
function PickItem(ItemType: Byte; arespawn: Boolean; var remove: Boolean): Boolean; virtual;
FNextWeap := $4000;
end;
-// used exclusively by network layer
-procedure TPlayer.SetWeaponHost(W: Byte);
+// used by network layer
+procedure TPlayer.SetWeapon(W: Byte);
begin
- if (W > High(FWeapon)) then exit;
- if (not FWeapon[W]) then exit; // server is authority!
-
if FCurrWeap <> W then
if (W = WEAPON_SAW) then
FSawSoundSelect.PlayAt(FObj.X, FObj.Y);