Skip to content
Merged
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
48 changes: 48 additions & 0 deletions src/game/server/jbmod/jbmod_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ LINK_ENTITY_TO_CLASS( player, CJBMod_Player );
LINK_ENTITY_TO_CLASS( info_player_combine, CPointEntity );
LINK_ENTITY_TO_CLASS( info_player_rebel, CPointEntity );

// CSS spawn entities
LINK_ENTITY_TO_CLASS( info_player_terrorist, CPointEntity );
LINK_ENTITY_TO_CLASS( info_player_counterterrorist, CPointEntity );

// DOD spawn entities
LINK_ENTITY_TO_CLASS( info_player_allies, CPointEntity );
LINK_ENTITY_TO_CLASS( info_player_axis, CPointEntity );

// specific to the local player
BEGIN_SEND_TABLE_NOBASE( CJBMod_Player, DT_JBModLocalPlayerExclusive )
// send a hi-res origin to the local player for use in prediction
Expand Down Expand Up @@ -1472,6 +1480,46 @@ CBaseEntity* CJBMod_Player::EntSelectSpawnPoint( void )
goto ReturnSpot;
}

// Incredibly terrible garbage way of getting CSS and DOD spawnpoints to work.
// These aren't set up for teamplay so it'll just plop you at a random spawn.
// Stops the game from immediately crashing on CSS maps.
// -nocaps 29.3.26

// cstrike spawns
if ( !pSpot )
{
pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_counterterrorist" );

if ( pSpot )
goto ReturnSpot;
}

if ( !pSpot )
{
pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_terrorist" );

if ( pSpot )
goto ReturnSpot;
}

// day of defeat spawns
if ( !pSpot )
{
pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_allies" );

if ( pSpot )
goto ReturnSpot;
}

if ( !pSpot )
{
pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_axis" );

if ( pSpot )
goto ReturnSpot;
}


ReturnSpot:

if ( JBModRules()->IsTeamplay() == true )
Expand Down