puffserver-rocks / puffdev

container for plugin issues and etc
0 stars 0 forks source link

ExtraSpawnPoints placing spawns where it shouldn't #1

Closed thehonker closed 2 years ago

thehonker commented 2 years ago

Plugin is generating spawn points in invalid (outside of spawn/buy area) locations while the server is in gamemode 0; gametype 0; (casual)

Appears to be generating them in deatchmatch locations. Suspect that it doesn't check which gametype/mode the spawn is set for.

https://github.com/honkhost/Extra-Spawn-Points

thehonker commented 2 years ago

ExtraSpawnPoints.sp#L159

Appears to be no check at all for which gamemode the spawn is valid for. Lemme fire up hammer and see what additional info is tied to info_player_ ents

thehonker commented 2 years ago

Not deatchmatch locations, wingman locations:

image

image

Appears that the standard method of determining between the two is the entity name, spawnpoints.standard and spawnpoints.2v2, so the plugin needs to check the entity name of the spawn before using it. If it sees spawnpoints.2v2, it should take action based on cvars and/or gametype/gamemode. Possibly:

sm_extraspawnpoints_auto (0 | 1) - take action based on game_type and game_mode (skip 2v2 for casual, skip standard for wingman, etc)
sm_extraspawnpoints_skip_unnamed (0 | 1)
sm_extraspawnpoints_skip_2v2 (1 | 0)
sm_extraspawnpoints_skip_standard (0 | 1)

Short term we can just skip over 2v2 spawns, that might be an acceptable long term fix as well.

thehonker commented 2 years ago

Tested, appears to be working good 👍. Will leave enabled for next beta night and see if the issue comes up again but :doubt: