From f23fe46f5ea851b61e3f94f39dcc295757654faf Mon Sep 17 00:00:00 2001 From: nocaps <22258110+nocapss@users.noreply.github.com> Date: Sun, 29 Mar 2026 11:32:41 +0100 Subject: [PATCH 1/3] Add CSS and DOD spawn entities --- src/game/server/jbmod/jbmod_player.cpp | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/game/server/jbmod/jbmod_player.cpp b/src/game/server/jbmod/jbmod_player.cpp index f9f09f4e0c8..114b2e9e47b 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,47 @@ 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 you from spawning in the ceiling on cs_office, at least. + // -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 ) From 71f69e139dab42cb92852c2873957c41451bc790 Mon Sep 17 00:00:00 2001 From: nocaps <22258110+nocapss@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:43:17 +0100 Subject: [PATCH 2/3] remove unneeded line this is just an excuse to do a commit with the signoff Signed-off-by: nocaps <22258110+nocapss@users.noreply.github.com> --- src/game/server/jbmod/jbmod_player.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/game/server/jbmod/jbmod_player.cpp b/src/game/server/jbmod/jbmod_player.cpp index 114b2e9e47b..5529ee51c11 100644 --- a/src/game/server/jbmod/jbmod_player.cpp +++ b/src/game/server/jbmod/jbmod_player.cpp @@ -1503,7 +1503,6 @@ CBaseEntity* CJBMod_Player::EntSelectSpawnPoint( void ) } // day of defeat spawns - if (!pSpot) { pSpot = gEntList.FindEntityByClassname(pSpot, "info_player_allies"); From cbbf8a94cdf5da2fd21d63cec9dff5cba22dd764 Mon Sep 17 00:00:00 2001 From: nocaps <22258110+nocapss@users.noreply.github.com> Date: Sun, 29 Mar 2026 20:40:42 +0100 Subject: [PATCH 3/3] Fix formatting as per request Signed-off-by: nocaps <22258110+nocapss@users.noreply.github.com> --- src/game/server/jbmod/jbmod_player.cpp | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/game/server/jbmod/jbmod_player.cpp b/src/game/server/jbmod/jbmod_player.cpp index 5529ee51c11..49d550b64bd 100644 --- a/src/game/server/jbmod/jbmod_player.cpp +++ b/src/game/server/jbmod/jbmod_player.cpp @@ -47,13 +47,13 @@ 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); +// 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); +// 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 ) @@ -1482,40 +1482,40 @@ CBaseEntity* CJBMod_Player::EntSelectSpawnPoint( void ) // 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 you from spawning in the ceiling on cs_office, at least. + // Stops the game from immediately crashing on CSS maps. // -nocaps 29.3.26 - //cstrike spawns - if (!pSpot) + // cstrike spawns + if ( !pSpot ) { - pSpot = gEntList.FindEntityByClassname(pSpot, "info_player_counterterrorist"); + pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_counterterrorist" ); - if (pSpot) + if ( pSpot ) goto ReturnSpot; } - if (!pSpot) + if ( !pSpot ) { - pSpot = gEntList.FindEntityByClassname(pSpot, "info_player_terrorist"); + pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_terrorist" ); - if (pSpot) + if ( pSpot ) goto ReturnSpot; } // day of defeat spawns - if (!pSpot) + if ( !pSpot ) { - pSpot = gEntList.FindEntityByClassname(pSpot, "info_player_allies"); + pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_allies" ); - if (pSpot) + if ( pSpot ) goto ReturnSpot; } - if (!pSpot) + if ( !pSpot ) { - pSpot = gEntList.FindEntityByClassname(pSpot, "info_player_axis"); + pSpot = gEntList.FindEntityByClassname( pSpot, "info_player_axis" ); - if (pSpot) + if ( pSpot ) goto ReturnSpot; }