set g_campaign_forceteam 0 "Forces the player to a given team in campaign mode, 1 = red, 2 = blue, 3 = yellow, 4 = pink"
seta g_campaign_name "xonoticbeta"
set g_campaign_skill 0
+alias warp "sv_cmd warp $*"
alias singleplayer_start "g_campaign_index 0; set scmenu_campaign_goto 0"
alias singleplayer_continue "set scmenu_campaign_goto -1"
void CampaignLevelWarp(float n)
{
+ if(n < 0)
+ n = campaign_level + 1;
CampaignFile_Unload();
CampaignFile_Load(n, 1);
if(campaign_entries)
remove(e);
DID_CHEAT();
break;
- case "warp":
- IS_CHEAT(0, argc, 0);
- if(argc == 2) if(autocvar_g_campaign)
- {
- CampaignLevelWarp(stof(argv(1)));
- DID_CHEAT();
- }
- break;
case "god":
IS_CHEAT(0, argc, 0);
BITXOR_ASSIGN(self.flags, FL_GODMODE);
print(" find classname\n");
print(" extendmatchtime\n");
print(" reducematchtime\n");
+ print(" warp [level]\n");
GameCommand_Vote("help", world);
GameCommand_Ban("help");
GameCommand_Generic("help");
return;
}
+ if(argv(0) == "warp")
+ {
+ if(autocvar_g_campaign)
+ {
+ if(argc >= 2)
+ CampaignLevelWarp(stof(argv(1)));
+ else
+ CampaignLevelWarp(-1);
+ }
+ else
+ print("Not in campaign, can't level warp\n");
+ }
+
print("Invalid command. For a list of supported commands, try sv_cmd help.\n");
}