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

Go to the source code of this file.

Functions

 spawnfunc (turret_checkpoint)
 spawnfunc (walker_checkpoint)
void turret_checkpoint_init (entity this)

Function Documentation

◆ spawnfunc() [1/2]

spawnfunc ( turret_checkpoint )

Definition at line 27 of file checkpoint.qc.

28{
29 setorigin(this, this.origin);
31}
void turret_checkpoint_init(entity this)
Definition checkpoint.qc:14
const int INITPRIO_FINDTARGET
Definition constants.qh:96
vector origin
void InitializeEntity(entity e, void(entity this) func, int order)
Definition world.qc:2209

References InitializeEntity(), INITPRIO_FINDTARGET, origin, and turret_checkpoint_init().

◆ spawnfunc() [2/2]

spawnfunc ( walker_checkpoint )

Definition at line 34 of file checkpoint.qc.

35{
36 spawnfunc_turret_checkpoint(this);
37}

◆ turret_checkpoint_init()

void turret_checkpoint_init ( entity this)

Definition at line 14 of file checkpoint.qc.

15{
16 traceline(this.origin + '0 0 16', this.origin - '0 0 1024', MOVE_WORLDONLY, this);
17 setorigin(this, trace_endpos + '0 0 32');
18
19 if(this.target && this.target != "")
20 {
21 this.enemy = find(NULL, targetname, this.target);
22 if(!this.enemy)
23 LOG_TRACE("A turret_checkpoint failed to find its target!");
24 }
25}
vector trace_endpos
float MOVE_WORLDONLY
#define LOG_TRACE(...)
Definition log.qh:76
entity find(entity start,.string field, string match)
#define NULL
Definition post.qh:14
entity enemy
Definition sv_ctf.qh:153
string targetname
Definition triggers.qh:56
string target
Definition triggers.qh:55

References enemy, entity(), find(), LOG_TRACE, MOVE_WORLDONLY, NULL, origin, target, targetname, and trace_endpos.

Referenced by spawnfunc().