diff --git a/game/bin/rebuild.fgd b/game/bin/rebuild.fgd index 2b3ca6a12f..dcee4f63b0 100644 --- a/game/bin/rebuild.fgd +++ b/game/bin/rebuild.fgd @@ -9,35 +9,20 @@ ] ] -@PointClass base(Targetname, PlayerClass, Angles) studio("models/editor/attacker_start.mdl") = info_player_attacker : - "This entity marks the start point for attackers." +@BaseClass base(Targetname, PlayerClass, Angles, EnableDisable) = NeoSpawnpointClass [ StartDisabled(choices) : "Start Disabled" : 0 = [ 0 : "No" 1 : "Yes" ] - - input Enable(void) : "Turn spawnpoint on." - input Disable(void) : "Turn spawnpoint off." output OnPlayerSpawn(void) : "Fires when a player spawns from this spawn point." ] -@PointClass base(Targetname, PlayerClass, Angles) studio("models/editor/defender_start.mdl") = info_player_defender : - "This entity marks the start point for defenders." -[ - StartDisabled(choices) : "Start Disabled" : 0 = - [ - 0 : "No" - 1 : "Yes" - ] - - input Enable(void) : "Turn spawnpoint on." - input Disable(void) : "Turn spawnpoint off." - - output OnPlayerSpawn(void) : "Fires when a player spawns from this spawn point." -] +@PointClass base(NeoSpawnpointClass) studio("models/editor/playerstart.mdl") = info_player_deathmatch : "Deathmatch Spawn" [] +@PointClass base(NeoSpawnpointClass) studio("models/editor/attacker_start.mdl") = info_player_attacker : "This entity marks the start point for attackers." [] +@PointClass base(NeoSpawnpointClass) studio("models/editor/defender_start.mdl") = info_player_defender : "This entity marks the start point for defenders." [] @PointClass base(Targetname) iconsprite("vgui/hud/star.vmt") = neo_bloom_controller : "An entity that lets you tweak bloom for your map." [ diff --git a/src/game/client/neo/ui/neo_hud_round_state.cpp b/src/game/client/neo/ui/neo_hud_round_state.cpp index 7543dc33a5..aec87e7174 100644 --- a/src/game/client/neo/ui/neo_hud_round_state.cpp +++ b/src/game/client/neo/ui/neo_hud_round_state.cpp @@ -705,6 +705,11 @@ void CNEOHud_RoundState::DrawNeoHudElement() void CNEOHud_RoundState::DrawPlayerList() { + if (!NEORules()->IsTeamplay()) + { + return; + } + ConVarRef cl_neo_bot_cmdr_enable_ref("sv_neo_bot_cmdr_enable"); Assert(cl_neo_bot_cmdr_enable_ref.IsValid()); if (cl_neo_bot_cmdr_enable_ref.IsValid() && cl_neo_bot_cmdr_enable_ref.GetBool()) diff --git a/src/game/server/neo/neo_player.cpp b/src/game/server/neo/neo_player.cpp index d75a80409c..a7139ca40d 100644 --- a/src/game/server/neo/neo_player.cpp +++ b/src/game/server/neo/neo_player.cpp @@ -3859,7 +3859,7 @@ int CNEO_Player::ShouldTransmit(const CCheckTransmitInfo* pInfo) #ifdef GLOWS_ENABLE otherNeoPlayer->IsDead() || #endif - GetTeamNumber() == otherNeoPlayer->GetTeamNumber()) + (GetTeamNumber() == otherNeoPlayer->GetTeamNumber() && NEORules()->IsTeamplay())) { return FL_EDICT_ALWAYS; } diff --git a/src/game/server/subs.cpp b/src/game/server/subs.cpp index 46a1570a41..92e27d7e09 100644 --- a/src/game/server/subs.cpp +++ b/src/game/server/subs.cpp @@ -13,6 +13,7 @@ #ifdef NEO #include "weapon_neobasecombatweapon.h" +#include "neo_player_spawnpoint.h" #endif // memdbgon must be the last include file in a .cpp file!!! @@ -42,10 +43,23 @@ void CNullEntity::Spawn( void ) } LINK_ENTITY_TO_CLASS(info_null,CNullEntity); +#ifdef NEO +class CBaseDMStart : public CNEOSpawnPoint +#else class CBaseDMStart : public CPointEntity +#endif { public: +#ifdef NEO + DECLARE_CLASS( CBaseDMStart, CNEOSpawnPoint ); + + CBaseDMStart() : CNEOSpawnPoint() + { + m_iOwningTeam = TEAM_ANY; + } +#else DECLARE_CLASS( CBaseDMStart, CPointEntity ); +#endif bool IsTriggered( CBaseEntity *pEntity ); diff --git a/src/game/shared/neo/neo_gamerules.cpp b/src/game/shared/neo/neo_gamerules.cpp index b891d26b2c..c74c7b29e9 100644 --- a/src/game/shared/neo/neo_gamerules.cpp +++ b/src/game/shared/neo/neo_gamerules.cpp @@ -4440,6 +4440,11 @@ bool CNEORules::FPlayerCanRespawn(CBasePlayer* pPlayer) if (CanRespawnAnyTime()) { + if (GetRoundStatus() == PostRound) + { + return false; + } + return true; } @@ -4711,7 +4716,16 @@ const char *CNEORules::GetTeamClantag(const int iTeamNum) const #ifdef GAME_DLL void CNEORules::OnNavMeshLoad(void) { - TheNavMesh->SetPlayerSpawnName("info_player_defender"); + // We need to access the game config directly because the game type might not be set at this stage + auto cfg = GetActiveGameConfig(); + if (!cfg || cfg->m_GameType != NEO_GAME_TYPE_DM) + { + TheNavMesh->SetPlayerSpawnName("info_player_defender"); + } + else + { + TheNavMesh->SetPlayerSpawnName("info_player_deathmatch"); + } } bool CNEORules::IsOfficialMap(void) diff --git a/src/game/shared/neo/neo_player_spawnpoint.cpp b/src/game/shared/neo/neo_player_spawnpoint.cpp index ab78130bb9..73ff307b8f 100644 --- a/src/game/shared/neo/neo_player_spawnpoint.cpp +++ b/src/game/shared/neo/neo_player_spawnpoint.cpp @@ -63,7 +63,7 @@ void CNEOSpawnPoint::Spawn() { BaseClass::Spawn(); - AssertMsg(m_iOwningTeam == TEAM_JINRAI || m_iOwningTeam == TEAM_NSF, + AssertMsg(m_iOwningTeam == TEAM_JINRAI || m_iOwningTeam == TEAM_NSF || m_iOwningTeam == TEAM_ANY, "CNEOSpawnPoint shouldn't be instantiated directly; use info_player_attacker/defender instead!\n"); #if(0)