Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
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
{
6
if
(!
autocvar_g_campaign
)
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
}
16
17
void
target_levelwarp_reset
(
entity
this
)
18
{
19
this.
active
=
ACTIVE_ACTIVE
;
20
}
21
22
spawnfunc
(target_levelwarp)
23
{
24
// this.cnt is index (starting from 1) of the campaign level to warp to
25
// 0 means next level
26
this.
use
=
target_levelwarp_use
;
27
this.
active
=
ACTIVE_ACTIVE
;
28
this.reset =
target_levelwarp_reset
;
29
}
30
#endif
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
cnt
float cnt
Definition
powerups.qc:24
use
#define use
Definition
csprogsdefs.qh:50
active
int active
Definition
defs.qh:34
ACTIVE_ACTIVE
const int ACTIVE_ACTIVE
Definition
defs.qh:37
target_levelwarp_reset
void target_levelwarp_reset(entity this)
Definition
levelwarp.qc:17
target_levelwarp_use
void target_levelwarp_use(entity this, entity actor, entity trigger)
Definition
levelwarp.qc:4
levelwarp.qh
autocvar_g_campaign
bool autocvar_g_campaign
Definition
menu.qc:747
CampaignLevelWarp
void CampaignLevelWarp(float n)
Definition
campaign.qc:261
spawnfunc
#define spawnfunc(id)
Definition
spawnfunc.qh:96
common
mapobjects
target
levelwarp.qc
Generated on
for Xonotic QuakeC by
1.14.0