Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
levelwarp.qc File Reference
#include "levelwarp.qh"
Include dependency graph for levelwarp.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 spawnfunc (target_levelwarp)
void target_levelwarp_reset (entity this)
void target_levelwarp_use (entity this, entity actor, entity trigger)

Function Documentation

◆ spawnfunc()

spawnfunc ( target_levelwarp )

Definition at line 22 of file levelwarp.qc.

23{
24 // this.cnt is index (starting from 1) of the campaign level to warp to
25 // 0 means next level
27 this.active = ACTIVE_ACTIVE;
28 this.reset = target_levelwarp_reset;
29}
#define use
int active
Definition defs.qh:34
const int ACTIVE_ACTIVE
Definition defs.qh:37
void target_levelwarp_reset(entity this)
Definition levelwarp.qc:17
void target_levelwarp_use(entity this, entity actor, entity trigger)
Definition levelwarp.qc:4

References active, ACTIVE_ACTIVE, target_levelwarp_reset(), target_levelwarp_use(), and use.

◆ target_levelwarp_reset()

void target_levelwarp_reset ( entity this)

Definition at line 17 of file levelwarp.qc.

18{
19 this.active = ACTIVE_ACTIVE;
20}

References active, ACTIVE_ACTIVE, and entity().

Referenced by spawnfunc().

◆ target_levelwarp_use()

void target_levelwarp_use ( entity this,
entity actor,
entity trigger )

Definition at line 4 of file levelwarp.qc.

5{
7 return; // only in campaign
8 if(this.active != ACTIVE_ACTIVE)
9 return;
10
11 if(this.cnt)
12 CampaignLevelWarp(this.cnt - 1); // specific level
13 else
14 CampaignLevelWarp(-1); // next level
15}
float cnt
Definition powerups.qc:24
bool autocvar_g_campaign
Definition menu.qc:747
void CampaignLevelWarp(float n)
Definition campaign.qc:261

References active, ACTIVE_ACTIVE, autocvar_g_campaign, CampaignLevelWarp(), cnt, and entity().

Referenced by spawnfunc().