diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 23f38ffd70a4916bbdde1d67bd417bf7d1d9ba3d..0921b782382a41844be44dc52372e869798b36ac 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
function GetRespawnPoint(): Byte;
procedure PressKey(Key: Byte; Time: Word = 1);
procedure ReleaseKeys();
function GetRespawnPoint(): Byte;
procedure PressKey(Key: Byte; Time: Word = 1);
procedure ReleaseKeys();
- procedure ReleaseKeysNoWeapon();
procedure SetModel(ModelName: String);
procedure SetColor(Color: TRGB);
procedure SetWeapon(W: Byte);
procedure SetModel(ModelName: String);
procedure SetColor(Color: TRGB);
procedure SetWeapon(W: Byte);
procedure TPlayer.QueueWeaponSwitch(Weapon: Byte);
begin
procedure TPlayer.QueueWeaponSwitch(Weapon: Byte);
begin
- //if g_Game_IsClient then Exit;
+ if g_Game_IsClient then Exit;
if Weapon > High(FWeapon) then Exit;
FNextWeap := FNextWeap or (1 shl Weapon);
end;
if Weapon > High(FWeapon) then Exit;
FNextWeap := FNextWeap or (1 shl Weapon);
end;
procedure TPlayer.NextWeapon();
begin
procedure TPlayer.NextWeapon();
begin
- //if g_Game_IsClient then Exit;
+ if g_Game_IsClient then Exit;
FNextWeap := $8000;
end;
procedure TPlayer.PrevWeapon();
begin
FNextWeap := $8000;
end;
procedure TPlayer.PrevWeapon();
begin
- //if g_Game_IsClient then Exit;
+ if g_Game_IsClient then Exit;
FNextWeap := $4000;
end;
FNextWeap := $4000;
end;
DoLerp(4);
if NetServer then
DoLerp(4);
if NetServer then
- begin
if FClientID >= 0 then
begin
FPing := NetClients[FClientID].Peer^.lastRoundTripTime;
if FClientID >= 0 then
begin
FPing := NetClients[FClientID].Peer^.lastRoundTripTime;
FPing := 0;
FLoss := 0;
end;
FPing := 0;
FLoss := 0;
end;
- end;
if FAlive and (FPunchAnim <> nil) then
FPunchAnim.Update();
if FAlive and (FPunchAnim <> nil) then
FPunchAnim.Update();
end;
// no need to do that each second frame, weapon queue will take care of it
end;
// no need to do that each second frame, weapon queue will take care of it
- if FAlive and FKeys[KEY_NEXTWEAPON].Pressed {and AnyServer} then NextWeapon();
- if FAlive and FKeys[KEY_PREVWEAPON].Pressed {and AnyServer} then PrevWeapon();
+ if FAlive and FKeys[KEY_NEXTWEAPON].Pressed and AnyServer then NextWeapon();
+ if FAlive and FKeys[KEY_PREVWEAPON].Pressed and AnyServer then PrevWeapon();
if gTime mod (GAME_TICK*2) <> 0 then
begin
if gTime mod (GAME_TICK*2) <> 0 then
begin
end;
end;
end;
end;
-procedure TPlayer.ReleaseKeysNoWeapon();
-var
- a: Integer;
-begin
- for a := Low(FKeys) to High(FKeys) do
- begin
- if (a = KEY_PREVWEAPON) or (a = KEY_NEXTWEAPON) then continue;
- FKeys[a].Pressed := False;
- FKeys[a].Time := 0;
- end;
-end;
-
procedure TPlayer.OnDamage(Angle: SmallInt);
begin
end;
procedure TPlayer.OnDamage(Angle: SmallInt);
begin
end;
end;
end;
end;
end;
- //HACK! (does it belong there?)
+ //HACK! (does it belongs there?)
RealizeCurrentWeapon();
// Åñëè åñòü âîçìîæíûå öåëè:
RealizeCurrentWeapon();
// Åñëè åñòü âîçìîæíûå öåëè: