Xonotic
levelwarp.qc
Go to the documentation of this file.
1 #include "levelwarp.qh"
2 
3 #ifdef SVQC
4 void target_levelwarp_use(entity this, entity actor, entity trigger)
5 {
7  return; // only in campaign
8 
9  if(this.cnt)
10  CampaignLevelWarp(this.cnt - 1); // specific level
11  else
12  CampaignLevelWarp(-1); // next level
13 }
14 
15 spawnfunc(target_levelwarp)
16 {
17  // this.cnt is index (starting from 1) of the campaign level to warp to
18  // 0 means next level
19  this.use = target_levelwarp_use;
20 }
21 #endif
entity() spawn
spawnfunc(info_player_attacker)
Definition: sv_assault.qc:283
float cnt
Definition: powerups.qc:24
void CampaignLevelWarp(float n)
Definition: campaign.qc:266
bool autocvar_g_campaign
Definition: campaign.qh:6
#define use
Definition: csprogsdefs.qh:50