You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any spawn that marked as never bomb carrier should not be selected as a possible spawn for a player holding the bomb.
Actual behavior
In basalt b site, if making a set of customs spawns and setting "never bomb carrier" spawns or "standard spawns" around B site will not follow usual logic. Any spawn will be valid for planting, regardless of type.
Steps to reproduce
Plugin version: latest
Sourcemod version: latest
Steps to reproduce (please be specific):
rcon map de_basalt
sm_edit
add T only spawns around b site with "never bomb carrier" and add a single spawn into planting area with "only bomb carrier"
save spawns
reload map
play retakes, see planting happening outside of plant area
public boolCanBombCarrierSpawn(int spawn) {
if (g_SpawnTeams[spawn] == CS_TEAM_CT)
returnfalse;
return (g_SpawnTypes[spawn] != SpawnType_NeverWithBomb) && SpawnInsideBombSite(spawn);
}
Most likely, the SpawnInsideBombSite is returning a non existing area and the code ends up using the potentialSpawns.length = 0fallback inside the SelectSpawn function.
I'd agree with anyone that this it is kind of an anti pattern to fix this problem in this plugin, but it would definitely be a better and more universally applicable design to only have spawns that allow planting: SpawnType_OnlyWithBomb and spawns that allow no planting: SpawnType_NeverWithBomb and remove SpawnType_Normal completely. With this, InsideBombSite checking could then entirely be removed. The addon doesn't need to care if someone puts their plant spawns outside of the area, it simply means they want it there. Allow for some misconfiguration to make the whole spawn system considerably simpler and elegant. It is also clear with de_ancient and de_basalt, that valve is no longer opting to include the proper bounding boxes for plantable areas anymore :(
The text was updated successfully, but these errors were encountered:
shinkathe
changed the title
de_basalt never bomb carrier spawns not working on b-site
de_basalt SpawnType_NeverWithBomb spawns not working on b-site
Nov 11, 2021
Expected behavior
Any spawn that marked as never bomb carrier should not be selected as a possible spawn for a player holding the bomb.
Actual behavior
In basalt b site, if making a set of customs spawns and setting "never bomb carrier" spawns or "standard spawns" around B site will not follow usual logic. Any spawn will be valid for planting, regardless of type.
Steps to reproduce
How to fix
The problem occurs in this code in spawns.sp:
Most likely, the SpawnInsideBombSite is returning a non existing area and the code ends up using the
potentialSpawns.length = 0
fallback inside theSelectSpawn
function.I'd agree with anyone that this it is kind of an anti pattern to fix this problem in this plugin, but it would definitely be a better and more universally applicable design to only have spawns that allow planting:
SpawnType_OnlyWithBomb
and spawns that allow no planting:SpawnType_NeverWithBomb
and removeSpawnType_Normal
completely. With this, InsideBombSite checking could then entirely be removed. The addon doesn't need to care if someone puts their plant spawns outside of the area, it simply means they want it there. Allow for some misconfiguration to make the whole spawn system considerably simpler and elegant. It is also clear with de_ancient and de_basalt, that valve is no longer opting to include the proper bounding boxes for plantable areas anymore :(The text was updated successfully, but these errors were encountered: