void norunes() { if( match_in_progress && !k_matchLess ) return; if ( !isCTF() ) { G_sprint ( self, 2, "Can't do this in non CTF mode\n" ); return; } cvar_toggle_msg( self, "k_ctf_runes", redtext("runes") ); // In matchless mode, toggling runes normally won't do anything since match is already in progress. Call this to handle this scenario. if (k_matchLess) { // If a player is carrying a rune when runes are disabled, get rid of it if (!cvar("k_ctf_runes")) { gedict_t * p; for (p = world; (p = find_plr(p)); ) { p->ctf_flag -= (p->ctf_flag & (CTF_RUNE_MASK)); p->maxspeed = cvar("sv_maxspeed"); // Reset speed, in case was carrying haste } } SpawnRunes(cvar("k_ctf_runes")); // Toggle runes } }
void noga() { if( match_in_progress ) return; if ( !isCTF() ) { G_sprint ( self, 2, "Can't do this in non CTF mode\n" ); return; } cvar_toggle_msg( self, "k_ctf_ga", redtext("green armor") ); }
void norunes() { if( match_in_progress ) return; if ( !isCTF() ) { G_sprint ( self, 2, "Can't do this in non CTF mode\n" ); return; } cvar_toggle_msg( self, "k_ctf_runes", redtext("runes") ); }
void ToggleFallBunny () { if( match_in_progress ) return; if ( k_yawnmode ) { G_sprint(self, 2, "Command blocked because yawnmode is active\n"); return; } cvar_toggle_msg( self, "k_fallbunny", redtext("fallbunny") ); }
void CTFBasedSpawn() { if( match_in_progress ) return; if ( !isCTF() ) { G_sprint ( self, 2, "Can't do this in non CTF mode\n" ); return; } if ( cvar("k_ctf_based_spawn") && ( find_cnt(FOFCLSN, "info_player_deathmatch") <= 1 ) ) { G_sprint ( self, 2, "Spawn on base enforced due to map limitation\n" ); return; } cvar_toggle_msg( self, "k_ctf_based_spawn", redtext("spawn on base") ); }
void nohook() { if( match_in_progress && !k_matchLess ) return; if ( !isCTF() ) { G_sprint ( self, 2, "Can't do this in non CTF mode\n" ); return; } cvar_toggle_msg( self, "k_ctf_hook", redtext("hook") ); // In matchless mode, toggling hook normally won't do anything since match is already in progress. Call this to handle this scenario. if (k_matchLess) { if ( cvar("k_ctf_hook") ) { AddHook( true ); } else { AddHook( false ); } } }