This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
Revision | dd665db7e154dda80a15bac37a30d5946f176d12 (tree) |
---|---|
Time | 2022-07-08 10:04:38 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Added the compiler flag SERVER_ALLOWBOTS that decides if the "addbot" CCMD is usable or not. Also added a message to informs users if bots are not allowed.
@@ -192,7 +192,8 @@ | ||
192 | 192 | if( SERVERONLY ) |
193 | 193 | # [TSPG] |
194 | 194 | option( TSPG_BLACKLIST "Disable blacklisted commands and protect some cvars" ) |
195 | - | |
195 | + option( TSPG_ALLOWBOTS "Allow bots to be added to the server" ) | |
196 | + | |
196 | 197 | set( NO_SOUND ON ) |
197 | 198 | set( NO_GTK ON ) |
198 | 199 | set( NO_GL ON ) |
@@ -202,6 +203,10 @@ | ||
202 | 203 | if( TSPG_BLACKLIST ) |
203 | 204 | add_definitions( -DSERVER_BLACKLIST=1 ) |
204 | 205 | endif( TSPG_BLACKLIST ) |
206 | + if( TSPG_ALLOWBOTS ) | |
207 | + add_definitions( -DSERVER_ALLOWBOTS=1 ) | |
208 | + endif( TSPG_ALLOWBOTS ) | |
209 | + | |
205 | 210 | endif( SERVERONLY ) |
206 | 211 | |
207 | 212 | set( FMOD_SEARCH_PATHS |
@@ -3841,9 +3841,12 @@ | ||
3841 | 3841 | CCMD( addbot ) |
3842 | 3842 | { |
3843 | 3843 | // [TSPG] |
3844 | - #if defined( SERVER_ONLY ) && defined( SERVER_BLACKLIST ) | |
3844 | + #if defined( SERVER_ONLY ) && !defined( SERVER_ALLOWBOTS ) | |
3845 | 3845 | if ( gamestate != GS_STARTUP ) |
3846 | + { | |
3847 | + Printf( "Bots are not allowed!\n" ); | |
3846 | 3848 | return; |
3849 | + } | |
3847 | 3850 | #endif |
3848 | 3851 | |
3849 | 3852 | CSkullBot *pBot; |