Skip to content

Fix crash when g_maxplayers smaller than current amount of active players

Slava requested to merge slavab/xonotic-data.pk3dir:master into master

This change fixes crash when amount of currently active players is larger than g_maxplayers which could happen after some votes.

Here's example crash dump:

Jan 26 23:42:20 pub.regulars.win public[15016]: s2044: ./lib/oo.qh:46: STORE_ENT  GLOBAL52330, GLOBAL4
Jan 26 23:42:20 pub.regulars.win public[15016]: s2045: ./lib/oo.qh:46: CALL2      setorigin (=setorigin())
Jan 26 23:42:20 pub.regulars.win public[15016]: s2046: ./lib/oo.qh:49: RETURN     GLOBAL52330
Jan 26 23:42:20 pub.regulars.win public[15016]: s2047: ./lib/oo.qh:37: CALL0      _spawn (=_spawn())
Jan 26 23:42:20 pub.regulars.win public[15016]:  ./lib/oo.qh:37 : __spawn : statement 18
Jan 26 23:42:20 pub.regulars.win public[15016]:             :461 : TeamBalance_CheckAllowedTeams : statement 14
Jan 26 23:42:20 pub.regulars.win public[15016]: ound_secrets:446 : bot_removefromlargestteam : statement 1
Jan 26 23:42:20 pub.regulars.win public[15016]: ound_secrets:495 : bot_removenewest : statement 1
Jan 26 23:42:20 pub.regulars.win public[15016]: ound_secrets:638 : bot_fixcount : statement 40
Jan 26 23:42:20 pub.regulars.win public[15016]: ound_secrets:739 : bot_serverframe : statement 118
Jan 26 23:42:20 pub.regulars.win public[15016]:           me:238 : _StartFrame : statement 108
Jan 26 23:42:20 pub.regulars.win public[15016]:             :215 : StartFrame : statement 2
Jan 26 23:42:20 pub.regulars.win public[15016]: Saving game to crash-server.dmp...

Merge request reports