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

Go to the source code of this file.

Functions

void Frozen_ice_create (entity this)
void Frozen_ice_remove (entity this)
void Frozen_ice_think (entity this)

Variables

entity frozen_ice

Function Documentation

◆ Frozen_ice_create()

void Frozen_ice_create ( entity this)

Definition at line 26 of file frozen.qc.

27{
28 entity ice = new(ice);
29 // set_movetype(ice, MOVETYPE_FOLLOW) would rotate the ice model with the player
30 ice.owner = this;
31 ice.scale = this.scale;
33 ice.nextthink = time;
34 ice.frame = floor(random() * 21); // ice model has 20 different looking frames
35 // TODO: unique (less pronounced) model
36 setmodel(ice, MDL_ICE);
37 ice.alpha = 0.5;
38
39 this.frozen_ice = ice;
40
42}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define setmodel(this, m)
Definition model.qh:26
float time
entity frozen_ice
Definition frozen.qc:4
void Frozen_ice_think(entity this)
Definition frozen.qc:13
float random(void)
float floor(float f)
float scale
Definition projectile.qc:14
#define setthink(e, f)

References entity(), floor(), frozen_ice, Frozen_ice_think(), random(), scale, setmodel, setthink, and time.

◆ Frozen_ice_remove()

void Frozen_ice_remove ( entity this)

Definition at line 6 of file frozen.qc.

7{
8 if(this.frozen_ice)
9 delete(this.frozen_ice);
10 this.frozen_ice = NULL;
11}
#define NULL
Definition post.qh:14

References entity(), frozen_ice, and NULL.

◆ Frozen_ice_think()

void Frozen_ice_think ( entity this)

Definition at line 13 of file frozen.qc.

14{
15 if(this.owner.frozen_ice != this || wasfreed(this.owner))
16 {
17 delete(this);
18 return;
19 }
20 vector ice_org = this.owner.origin - '0 0 16';
21 if(this.origin != ice_org)
22 setorigin(this, ice_org);
23 this.nextthink = time;
24}
entity owner
Definition main.qh:87
float nextthink
vector origin
vector
Definition self.qh:92

References entity(), nextthink, origin, owner, time, and vector.

Referenced by Frozen_ice_create().

Variable Documentation

◆ frozen_ice

entity frozen_ice

Definition at line 4 of file frozen.qc.

Referenced by Frozen_ice_create(), and Frozen_ice_remove().