diff --git a/src/game/server/jbmod/jbmod_player.cpp b/src/game/server/jbmod/jbmod_player.cpp index f9f09f4e0c8..49d550b64bd 100644 --- a/src/game/server/jbmod/jbmod_player.cpp +++ b/src/game/server/jbmod/jbmod_player.cpp @@ -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 @@ -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 )