From 413f913516647f967ef9a812c7ffca99f4ecd0e4 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 11 May 2022 12:51:21 -0700 Subject: [PATCH] Adjust naming against upstream. --- src/server/gamerules.qc | 12 ++++++------ src/server/gamerules_multiplayer.qc | 6 +++--- src/shared/player.qc | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/server/gamerules.qc b/src/server/gamerules.qc index 8e3fe37..e318d37 100644 --- a/src/server/gamerules.qc +++ b/src/server/gamerules.qc @@ -24,7 +24,7 @@ HLGameRules::IsMultiplayer(void) } void -HLGameRules::LevelDecodeParms(base_player pp) +HLGameRules::LevelDecodeParms(NSClientPlayer pp) { player pl = (player)pp; g_landmarkpos[0] = parm1; @@ -69,7 +69,7 @@ HLGameRules::LevelDecodeParms(base_player pp) } void -HLGameRules::LevelChangeParms(base_player pp) +HLGameRules::LevelChangeParms(NSClientPlayer pp) { player pl = (player)pp; parm1 = g_landmarkpos[0]; @@ -119,19 +119,19 @@ HLGameRules::LevelNewParms(void) /* we check what fields have changed over the course of the frame and network * only the ones that have actually changed */ void -HLGameRules::PlayerPostFrame(base_player pp) +HLGameRules::PlayerPostFrame(NSClientPlayer pp) { } void -HLGameRules::PlayerConnect(base_player pl) +HLGameRules::PlayerConnect(NSClientPlayer pl) { if (Plugin_PlayerConnect(pl) == FALSE) bprint(PRINT_HIGH, sprintf("%s connected\n", pl.netname)); } void -HLGameRules::PlayerDisconnect(base_player pl) +HLGameRules::PlayerDisconnect(NSClientPlayer pl) { bprint(PRINT_HIGH, sprintf("%s disconnected\n", pl.netname)); @@ -145,7 +145,7 @@ HLGameRules::PlayerDisconnect(base_player pl) } void -HLGameRules::PlayerKill(base_player pp) +HLGameRules::PlayerKill(NSClientPlayer pp) { player pl = (player)pp; Damage_Apply(pl, pl, pl.health, WEAPON_NONE, DMG_SKIP_ARMOR); diff --git a/src/server/gamerules_multiplayer.qc b/src/server/gamerules_multiplayer.qc index c3c280e..85f4209 100644 --- a/src/server/gamerules_multiplayer.qc +++ b/src/server/gamerules_multiplayer.qc @@ -41,7 +41,7 @@ HLMultiplayerRules::CheckRules(void) } void -HLMultiplayerRules::PlayerDeath(base_player pl) +HLMultiplayerRules::PlayerDeath(NSClientPlayer pl) { /* obituary networking */ WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET); @@ -103,7 +103,7 @@ HLMultiplayerRules::PlayerDeath(base_player pl) } void -HLMultiplayerRules::PlayerSpawn(base_player pp) +HLMultiplayerRules::PlayerSpawn(NSClientPlayer pp) { player pl = (player)pp; /* this is where the mods want to deviate */ @@ -154,7 +154,7 @@ HLMultiplayerRules::PlayerSpawn(base_player pp) } float -HLMultiplayerRules::ConsoleCommand(base_player pp, string cmd) +HLMultiplayerRules::ConsoleCommand(NSClientPlayer pp, string cmd) { tokenize(cmd); diff --git a/src/shared/player.qc b/src/shared/player.qc index bc696f0..2c40aa4 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -42,7 +42,7 @@ enumflags PLAYER_UNUSED2 }; -class player:base_player +class player:NSClientPlayer { PREDICTED_INT(anim_top); PREDICTED_FLOAT(anim_top_time); @@ -102,7 +102,7 @@ player::ReceiveEntity void player::ReceiveEntity(float new, float fl) { - base_player::ReceiveEntity(new, fl); + NSClientPlayer::ReceiveEntity(new, fl); /* animation */ if (fl & PLAYER_TOPFRAME) { @@ -166,7 +166,7 @@ so we can roll them back later. void player::PredictPreFrame(void) { - base_player::PredictPreFrame(); + NSClientPlayer::PredictPreFrame(); SAVE_STATE(anim_top); SAVE_STATE(anim_top_time); @@ -214,7 +214,7 @@ Where we roll back our values to the ones last sent/verified by the server. void player::PredictPostFrame(void) { - base_player::PredictPostFrame(); + NSClientPlayer::PredictPostFrame(); ROLL_BACK(anim_top); ROLL_BACK(anim_top_time); @@ -256,7 +256,7 @@ player::PredictPostFrame(void) void player::EvaluateEntity(void) { - base_player::EvaluateEntity(); + NSClientPlayer::EvaluateEntity(); /* animation */ if (ATTR_CHANGED(anim_bottom) || ATTR_CHANGED(anim_bottom_time)) @@ -381,7 +381,7 @@ player::SendEntity(entity ePEnt, float fChanged) WriteByte(MSG_ENTITY, ENT_PLAYER); WriteFloat(MSG_ENTITY, fChanged); - base_player::SendEntity(ePEnt, fChanged); + NSClientPlayer::SendEntity(ePEnt, fChanged); if (fChanged & PLAYER_TOPFRAME) { WriteByte(MSG_ENTITY, anim_top);