Xonotic
vehicle.qh
Go to the documentation of this file.
1 #pragma once
2 
4  ATTRIB(Vehicle, vehicleid, int, 0);
6  ATTRIB(Vehicle, m_icon, string);
8  ATTRIB(Vehicle, netname, string, "");
10  ATTRIB(Vehicle, vehicle_name, string, "Vehicle");
12  ATTRIB(Vehicle, model, string, "");
14  ATTRIB(Vehicle, mdl, string, "");
16  ATTRIB(Vehicle, head_model, string, "");
18  ATTRIB(Vehicle, hud_model, string, "");
20  ATTRIB(Vehicle, tag_head, string);
22  ATTRIB(Vehicle, tag_hud, string);
24  ATTRIB(Vehicle, tag_view, string);
26  ATTRIB(Vehicle, PlayerPhysplug, bool(entity,float));
28  ATTRIB(Vehicle, spawnflags, int, 0);
30  ATTRIB(Vehicle, m_mins, vector, '-0 -0 -0');
32  ATTRIB(Vehicle, m_maxs, vector, '0 0 0');
34  ATTRIB(Vehicle, view_ofs, vector, '0 0 0');
36  ATTRIB(Vehicle, height, float, 0);
37 
39  METHOD(Vehicle, vr_setup, void(Vehicle this, entity instance)) { }
41  METHOD(Vehicle, vr_think, void(Vehicle this, entity instance)) { }
43  METHOD(Vehicle, vr_death, void(Vehicle this, entity instance)) { }
45  METHOD(Vehicle, vr_precache, void(Vehicle this)) { }
47  METHOD(Vehicle, vr_enter, void(Vehicle this, entity instance)) { }
49  METHOD(Vehicle, vr_gunner_enter, void(Vehicle this, entity instance, entity actor)) { }
51  METHOD(Vehicle, vr_spawn, void(Vehicle this, entity instance)) { }
53  METHOD(Vehicle, vr_impact, void(Vehicle this, entity instance)) { }
55  METHOD(Vehicle, vr_setcolors, void(Vehicle this, entity instance)) { }
57  METHOD(Vehicle, vr_hud, void(Vehicle this)) { }
59  METHOD(Vehicle, vr_crosshair, void(Vehicle thisveh, entity player)) { }
61 
62 // vehicle spawn flags (need them here for common registrations)
63 const int VHF_ISVEHICLE = BIT(1);
64 const int VHF_HASSHIELD = BIT(2);
65 const int VHF_SHIELDREGEN = BIT(3);
66 const int VHF_HEALTHREGEN = BIT(4);
67 const int VHF_ENERGYREGEN = BIT(5);
68 const int VHF_DEATHEJECT = BIT(6);
69 const int VHF_MOVE_GROUND = BIT(7);
70 const int VHF_MOVE_HOVER = BIT(8);
71 const int VHF_MOVE_FLY = BIT(9);
72 const int VHF_DMGSHAKE = BIT(10);
73 const int VHF_DMGROLL = BIT(11);
74 const int VHF_DMGHEADROLL = BIT(12);
75 const int VHF_MULTISLOT = BIT(13);
76 const int VHF_PLAYERSLOT = BIT(14);
77 
78 // fields:
entity tur_head
This ent is a player slot on a multi-person vehicle.
Definition: vehicle.qh:79
const int VHF_HASSHIELD
Indicates vehicle.
Definition: vehicle.qh:64
const int VHF_PLAYERSLOT
Vehicle has multiple player slots.
Definition: vehicle.qh:76
vector view_ofs
Definition: progsdefs.qc:151
CLASS(Object) Object
Definition: oo.qh:318
const int VHF_DMGROLL
Add random velocity each frame if health < 50%.
Definition: vehicle.qh:73
entity() spawn
const int VHF_MOVE_GROUND
Vehicle ejects pilot upon fatal damage.
Definition: vehicle.qh:69
const int VHF_ISVEHICLE
Definition: vehicle.qh:63
const int VHF_DMGSHAKE
Vehicle is airborn.
Definition: vehicle.qh:72
string netname
Definition: powerups.qc:20
#define METHOD(cname, name, prototype)
Definition: oo.qh:257
float spawnflags
Definition: progsdefs.qc:191
string model
Definition: csprogsdefs.qc:108
#define ATTRIB(...)
Definition: oo.qh:136
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition: bits.qh:8
const int VHF_SHIELDREGEN
Vehicle has shileding.
Definition: vehicle.qh:65
const int VHF_MOVE_HOVER
Vehicle moves on gound.
Definition: vehicle.qh:70
const int VHF_MOVE_FLY
Vehicle hover close to gound.
Definition: vehicle.qh:71
float height
Definition: jumppads.qh:12
entity this
Definition: self.qh:83
vector(float skel, float bonenum) _skel_get_boneabs_hidden
entity vehicledef
Definition: vehicle.qh:80
const int VHF_MULTISLOT
Add random head angles each frame if health < 50%.
Definition: vehicle.qh:75
const int VHF_HEALTHREGEN
Vehicles shield regenerates.
Definition: vehicle.qh:66
const int VHF_ENERGYREGEN
Vehicles health regenerates.
Definition: vehicle.qh:67
#define ENDCLASS(cname)
Definition: oo.qh:269
const int VHF_DEATHEJECT
Vehicles energy regenerates.
Definition: vehicle.qh:68
const int VHF_DMGHEADROLL
Add random angles each frame if health < 50%.
Definition: vehicle.qh:74