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
{
6
if
(!
autocvar_g_campaign
)
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
entity() spawn
spawnfunc
spawnfunc(info_player_attacker)
Definition:
sv_assault.qc:283
cnt
float cnt
Definition:
powerups.qc:24
levelwarp.qh
CampaignLevelWarp
void CampaignLevelWarp(float n)
Definition:
campaign.qc:266
autocvar_g_campaign
bool autocvar_g_campaign
Definition:
campaign.qh:6
use
#define use
Definition:
csprogsdefs.qh:50
common
mapobjects
target
levelwarp.qc
Generated on Thu Mar 17 2022 17:26:27 for Xonotic by
1.8.13