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

Go to the source code of this file.

Functions

void corner_link (entity this)
bool corner_send (entity this, entity to, int sf)
 spawnfunc (path_corner)

Function Documentation

◆ corner_link()

void corner_link ( entity this)

Definition at line 39 of file corner.qc.

40{
41 //Net_LinkEntity(this, false, 0, corner_send);
42}

References entity().

Referenced by spawnfunc().

◆ corner_send()

bool corner_send ( entity this,
entity to,
int sf )

Definition at line 5 of file corner.qc.

6{
7 WriteHeader(MSG_ENTITY, ENT_CLIENT_CORNER);
8
10
11 WriteVector(MSG_ENTITY, this.origin);
12
13 sf = 0;
14 sf = BITSET(sf, BIT(0), this.target_random);
15
16 sf = BITSET(sf, BIT(1), this.target && this.target != "");
17 sf = BITSET(sf, BIT(2), this.target2 && this.target2 != "");
18 sf = BITSET(sf, BIT(3), this.target3 && this.target3 != "");
19 sf = BITSET(sf, BIT(4), this.target4 && this.target4 != "");
20 sf = BITSET(sf, BIT(5), this.targetname && this.targetname != "");
21
23 if(sf & BIT(1))
25 if(sf & BIT(2))
27 if(sf & BIT(3))
29 if(sf & BIT(4))
31 if(sf & BIT(5))
33
35
36 return true;
37}
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
#define BITSET(var, mask, flag)
Definition bits.qh:11
float wait
Definition items.qc:17
vector origin
const int MSG_ENTITY
Definition net.qh:115
#define WriteHeader(to, id)
Definition net.qh:221
void WriteString(string data, float dest, float desto)
void WriteByte(float data, float dest, float desto)
string target4
Definition subs.qh:55
string target3
Definition subs.qh:54
float target_random
Definition subs.qh:57
string platmovetype
Definition subs.qh:43
string target2
string targetname
Definition triggers.qh:56
string target
Definition triggers.qh:55

References BIT, BITSET, entity(), MSG_ENTITY, origin, platmovetype, target, target2, target3, target4, target_random, targetname, wait, WriteByte(), WriteHeader, and WriteString().

◆ spawnfunc()

spawnfunc ( path_corner )

Definition at line 44 of file corner.qc.

45{
46 // setup values for overriding train movement
47 // if a second value does not exist, both start and end speeds are the single value specified
49
50 corner_link(this);
51}
void corner_link(entity this)
Definition corner.qc:39
bool set_platmovetype(entity e, string s)
Definition platforms.qc:209

References corner_link(), platmovetype, and set_platmovetype().