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

Go to the source code of this file.

Classes

class  RaptorBomb
class  RaptorCannon
class  RaptorFlare

Functions

void RaptorCBShellfragDraw (entity this)
void RaptorCBShellfragToss (vector _org, vector _vel, vector _ang)
 REGISTER_WEAPON (RAPTOR, NEW(RaptorCannon))
 REGISTER_WEAPON (RAPTOR_BOMB, NEW(RaptorBomb))
 REGISTER_WEAPON (RAPTOR_FLARE, NEW(RaptorFlare))

Variables

float autocvar_g_vehicle_raptor_bomblet_alt = 750
float autocvar_g_vehicle_raptor_bomblet_damage = 55
float autocvar_g_vehicle_raptor_bomblet_edgedamage = 25
float autocvar_g_vehicle_raptor_bomblet_explode_delay = 0.4
float autocvar_g_vehicle_raptor_bomblet_force = 150
float autocvar_g_vehicle_raptor_bomblet_radius = 350
float autocvar_g_vehicle_raptor_bomblet_spread = 0.4
float autocvar_g_vehicle_raptor_bomblet_time = 0.5
float autocvar_g_vehicle_raptor_bomblets = 8
float autocvar_g_vehicle_raptor_bombs_refire = 5
float autocvar_g_vehicle_raptor_cannon_cost = 1
float autocvar_g_vehicle_raptor_cannon_damage = 10
float autocvar_g_vehicle_raptor_cannon_force = 25
float autocvar_g_vehicle_raptor_cannon_radius = 60
float autocvar_g_vehicle_raptor_cannon_refire = 0.033333
float autocvar_g_vehicle_raptor_cannon_speed = 24000
float autocvar_g_vehicle_raptor_cannon_spread = 0.01
float autocvar_g_vehicle_raptor_flare_chase = 0.9
float autocvar_g_vehicle_raptor_flare_lifetime = 10
float autocvar_g_vehicle_raptor_flare_range = 2000
float autocvar_g_vehicle_raptor_flare_refire = 5

Function Documentation

◆ RaptorCBShellfragDraw()

void RaptorCBShellfragDraw ( entity this)

Definition at line 218 of file raptor_weapons.qc.

219{
220 if(wasfreed(this))
221 return;
222
224 this.avelocity += randomvec() * 15;
225 this.renderflags = 0;
226
227 if(this.cnt < time)
228 this.alpha = bound(0, this.nextthink - time, 1);
229
230 if(this.alpha < ALPHA_MIN_VISIBLE)
231 delete(this);
232}
float cnt
Definition powerups.qc:24
float alpha
Definition items.qc:13
float renderflags
Definition main.qh:111
const float ALPHA_MIN_VISIBLE
Definition main.qh:158
vector avelocity
float time
float nextthink
float autocvar_cl_gibs_ticrate
Definition gibs.qh:13
bool autocvar_cl_gibs_sloppy
Definition gibs.qh:12
float bound(float min, float value, float max)
vector randomvec(void)
void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)
Definition movetypes.qc:835

References alpha, ALPHA_MIN_VISIBLE, autocvar_cl_gibs_sloppy, autocvar_cl_gibs_ticrate, avelocity, bound(), cnt, entity(), Movetype_Physics_MatchTicrate(), nextthink, randomvec(), renderflags, and time.

Referenced by RaptorCBShellfragToss().

◆ RaptorCBShellfragToss()

void RaptorCBShellfragToss ( vector _org,
vector _vel,
vector _ang )

Definition at line 234 of file raptor_weapons.qc.

235{
236 entity sfrag = new(RaptorCBShellfrag);
237 setmodel(sfrag, MDL_VEH_RAPTOR_CB_FRAGMENT);
238 sfrag.solid = SOLID_CORPSE; // before setorigin to ensure area grid linking
239 setorigin(sfrag, _org);
240
242 sfrag.gravity = 0.15;
243
244 sfrag.draw = RaptorCBShellfragDraw;
245 IL_PUSH(g_drawables, sfrag);
246
247 sfrag.velocity = _vel;
248 sfrag.avelocity = prandomvec() * vlen(sfrag.velocity);
249 sfrag.angles = _ang;
250
251 sfrag.move_time = time;
252 sfrag.damageforcescale = 4;
253
254 sfrag.nextthink = time + 3;
255 sfrag.cnt = time + 2;
256 sfrag.alpha = 1;
257 sfrag.drawmask = MASK_NORMAL;
258}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
IntrusiveList g_drawables
Definition main.qh:91
#define setmodel(this, m)
Definition model.qh:26
const float MASK_NORMAL
const float SOLID_CORPSE
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
float vlen(vector v)
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
const int MOVETYPE_BOUNCE
Definition movetypes.qh:139
vector prandomvec()
Definition random.qc:121
void RaptorCBShellfragDraw(entity this)

References entity(), g_drawables, IL_PUSH(), MASK_NORMAL, MOVETYPE_BOUNCE, prandomvec(), RaptorCBShellfragDraw(), set_movetype(), setmodel, SOLID_CORPSE, time, vector, and vlen().

Referenced by NET_HANDLE().

◆ REGISTER_WEAPON() [1/3]

REGISTER_WEAPON ( RAPTOR ,
NEW(RaptorCannon)  )

References NEW, and REGISTER_WEAPON.

◆ REGISTER_WEAPON() [2/3]

REGISTER_WEAPON ( RAPTOR_BOMB ,
NEW(RaptorBomb)  )

References NEW, and REGISTER_WEAPON.

◆ REGISTER_WEAPON() [3/3]

REGISTER_WEAPON ( RAPTOR_FLARE ,
NEW(RaptorFlare)  )

References NEW, and REGISTER_WEAPON.

Variable Documentation

◆ autocvar_g_vehicle_raptor_bomblet_alt

float autocvar_g_vehicle_raptor_bomblet_alt = 750

Definition at line 39 of file raptor_weapons.qh.

Referenced by raptor_bomb_burst(), and raptor_bombdrop().

◆ autocvar_g_vehicle_raptor_bomblet_damage

float autocvar_g_vehicle_raptor_bomblet_damage = 55

Definition at line 41 of file raptor_weapons.qh.

Referenced by raptor_bomblet_boom().

◆ autocvar_g_vehicle_raptor_bomblet_edgedamage

float autocvar_g_vehicle_raptor_bomblet_edgedamage = 25

Definition at line 43 of file raptor_weapons.qh.

Referenced by raptor_bomblet_boom().

◆ autocvar_g_vehicle_raptor_bomblet_explode_delay

float autocvar_g_vehicle_raptor_bomblet_explode_delay = 0.4

Definition at line 46 of file raptor_weapons.qh.

Referenced by raptor_bomblet_touch().

◆ autocvar_g_vehicle_raptor_bomblet_force

float autocvar_g_vehicle_raptor_bomblet_force = 150

Definition at line 45 of file raptor_weapons.qh.

Referenced by raptor_bomblet_boom().

◆ autocvar_g_vehicle_raptor_bomblet_radius

float autocvar_g_vehicle_raptor_bomblet_radius = 350

Definition at line 44 of file raptor_weapons.qh.

Referenced by raptor_bomb_burst(), and raptor_bomblet_boom().

◆ autocvar_g_vehicle_raptor_bomblet_spread

float autocvar_g_vehicle_raptor_bomblet_spread = 0.4

Definition at line 42 of file raptor_weapons.qh.

Referenced by raptor_bomb_burst().

◆ autocvar_g_vehicle_raptor_bomblet_time

float autocvar_g_vehicle_raptor_bomblet_time = 0.5

Definition at line 40 of file raptor_weapons.qh.

Referenced by raptor_bombdrop().

◆ autocvar_g_vehicle_raptor_bomblets

float autocvar_g_vehicle_raptor_bomblets = 8

Definition at line 38 of file raptor_weapons.qh.

Referenced by raptor_bomb_burst().

◆ autocvar_g_vehicle_raptor_bombs_refire

float autocvar_g_vehicle_raptor_bombs_refire = 5

Definition at line 48 of file raptor_weapons.qh.

Referenced by raptor_frame().

◆ autocvar_g_vehicle_raptor_cannon_cost

float autocvar_g_vehicle_raptor_cannon_cost = 1

Definition at line 30 of file raptor_weapons.qh.

Referenced by SOUND().

◆ autocvar_g_vehicle_raptor_cannon_damage

float autocvar_g_vehicle_raptor_cannon_damage = 10

Definition at line 31 of file raptor_weapons.qh.

◆ autocvar_g_vehicle_raptor_cannon_force

float autocvar_g_vehicle_raptor_cannon_force = 25

Definition at line 36 of file raptor_weapons.qh.

◆ autocvar_g_vehicle_raptor_cannon_radius

float autocvar_g_vehicle_raptor_cannon_radius = 60

Definition at line 32 of file raptor_weapons.qh.

◆ autocvar_g_vehicle_raptor_cannon_refire

float autocvar_g_vehicle_raptor_cannon_refire = 0.033333

Definition at line 33 of file raptor_weapons.qh.

Referenced by SOUND().

◆ autocvar_g_vehicle_raptor_cannon_speed

float autocvar_g_vehicle_raptor_cannon_speed = 24000

Definition at line 34 of file raptor_weapons.qh.

Referenced by raptor_frame().

◆ autocvar_g_vehicle_raptor_cannon_spread

float autocvar_g_vehicle_raptor_cannon_spread = 0.01

Definition at line 35 of file raptor_weapons.qh.

◆ autocvar_g_vehicle_raptor_flare_chase

float autocvar_g_vehicle_raptor_flare_chase = 0.9

Definition at line 52 of file raptor_weapons.qh.

◆ autocvar_g_vehicle_raptor_flare_lifetime

float autocvar_g_vehicle_raptor_flare_lifetime = 10

Definition at line 51 of file raptor_weapons.qh.

◆ autocvar_g_vehicle_raptor_flare_range

float autocvar_g_vehicle_raptor_flare_range = 2000

Definition at line 53 of file raptor_weapons.qh.

◆ autocvar_g_vehicle_raptor_flare_refire

float autocvar_g_vehicle_raptor_flare_refire = 5

Definition at line 50 of file raptor_weapons.qh.

Referenced by raptor_frame().