Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions game/bin/rebuild.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -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."
[
Expand Down
5 changes: 5 additions & 0 deletions src/game/client/neo/ui/neo_hud_round_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/neo/neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
14 changes: 14 additions & 0 deletions src/game/server/subs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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!!!
Expand Down Expand Up @@ -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 );

Expand Down
16 changes: 15 additions & 1 deletion src/game/shared/neo/neo_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4440,6 +4440,11 @@ bool CNEORules::FPlayerCanRespawn(CBasePlayer* pPlayer)

if (CanRespawnAnyTime())
{
if (GetRoundStatus() == PostRound)
{
return false;
}

return true;
}

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/game/shared/neo/neo_player_spawnpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading