5 ATTRIB(Vehicle, vehicleid, int, 0)
7 ATTRIB(Vehicle, m_icon, string, string_null)
9 ATTRIB(Vehicle, netname, string, "")
10 /** human readable name */
11 ATTRIB(Vehicle, vehicle_name, string, "Vehicle")
12 /** full name of model */
13 ATTRIB(Vehicle, model, string, "")
14 /** currently a copy of the model */
15 ATTRIB(Vehicle, mdl, string, "")
16 /** full name of tur_head model */
17 ATTRIB(Vehicle, head_model, string, "")
19 ATTRIB(Vehicle, hud_model, string, "")
20 /** tur_head model tag */
21 ATTRIB(Vehicle, tag_head, string, string_null)
23 ATTRIB(Vehicle, tag_hud, string, string_null)
24 /** cockpit model tag */
25 ATTRIB(Vehicle, tag_view, string, string_null)
26 /** player physics mod */
27 ATTRIB(Vehicle, PlayerPhysplug, int(), func_null)
29 ATTRIB(Vehicle, spawnflags, int, 0)
30 /** vehicle hitbox size */
31 ATTRIB(Vehicle, mins, vector, '-0 -0 -0')
32 /** vehicle hitbox size */
33 ATTRIB(Vehicle, maxs, vector, '0 0 0')
34 /** vehicle 3rd person view offset */
35 ATTRIB(Vehicle, view_ofs, vector, '0 0 0')
36 /** vehicle 3rd person view distance */
37 ATTRIB(Vehicle, height, float, 0)
39 /** (BOTH) setup vehicle data */
40 METHOD(Vehicle, vr_setup, void(Vehicle)) { }
41 /** (SERVER) logic to run every frame */
42 METHOD(Vehicle, vr_think, void(Vehicle)) { }
43 /** (SERVER) called when vehicle dies */
44 METHOD(Vehicle, vr_death, void(Vehicle)) { }
45 /** (BOTH) precaches models/sounds used by this vehicle */
46 METHOD(Vehicle, vr_precache, void(Vehicle)) { }
47 /** (SERVER) called when a player enters this vehicle */
48 METHOD(Vehicle, vr_enter, void(Vehicle)) { }
49 /** (SERVER) called when the vehicle re-spawns */
50 METHOD(Vehicle, vr_spawn, void(Vehicle)) { }
51 /** (SERVER) called when a vehicle hits something */
52 METHOD(Vehicle, vr_impact, void(Vehicle)) { }
53 /** (CLIENT) logic to run every frame */
54 METHOD(Vehicle, vr_hud, void(Vehicle)) { }
55 /** (CLIENT) logic to run every frame */
56 METHOD(Vehicle, vr_crosshair, void(Vehicle)) { }
59 // vehicle spawn flags (need them here for common registrations)
60 const int VHF_ISVEHICLE = 2; /// Indicates vehicle
61 const int VHF_HASSHIELD = 4; /// Vehicle has shileding
62 const int VHF_SHIELDREGEN = 8; /// Vehicles shield regenerates
63 const int VHF_HEALTHREGEN = 16; /// Vehicles health regenerates
64 const int VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates
65 const int VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage
66 const int VHF_MOVE_GROUND = 128; /// Vehicle moves on gound
67 const int VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound
68 const int VHF_MOVE_FLY = 512; /// Vehicle is airborn
69 const int VHF_DMGSHAKE = 1024; /// Add random velocity each frame if health < 50%
70 const int VHF_DMGROLL = 2048; /// Add random angles each frame if health < 50%
71 const int VHF_DMGHEADROLL = 4096; /// Add random head angles each frame if health < 50%
72 const int VHF_MULTISLOT = 8192; /// Vehicle has multiple player slots
73 const int VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-person vehicle