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')
35 /** (BOTH) setup vehicle data */
36 METHOD(Vehicle, vr_setup, void(Vehicle)) { }
37 /** (SERVER) logic to run every frame */
38 METHOD(Vehicle, vr_think, void(Vehicle)) { }
39 /** (SERVER) called when vehicle dies */
40 METHOD(Vehicle, vr_death, void(Vehicle)) { }
41 /** (BOTH) precaches models/sounds used by this vehicle */
42 METHOD(Vehicle, vr_precache, void(Vehicle)) { }
43 /** (SERVER) called when a player enters this vehicle */
44 METHOD(Vehicle, vr_enter, void(Vehicle)) { }
45 /** (SERVER) called when the vehicle re-spawns */
46 METHOD(Vehicle, vr_spawn, void(Vehicle)) { }
47 /** (SERVER) called when a vehicle hits something */
48 METHOD(Vehicle, vr_impact, void(Vehicle)) { }
49 /** (CLIENT) logic to run every frame */
50 METHOD(Vehicle, vr_hud, void(Vehicle)) { }
51 /** (CLIENT) logic to run every frame */
52 METHOD(Vehicle, vr_crosshair, void(Vehicle)) { }
55 // vehicle spawn flags (need them here for common registrations)
56 const int VHF_ISVEHICLE = 2; /// Indicates vehicle
57 const int VHF_HASSHIELD = 4; /// Vehicle has shileding
58 const int VHF_SHIELDREGEN = 8; /// Vehicles shield regenerates
59 const int VHF_HEALTHREGEN = 16; /// Vehicles health regenerates
60 const int VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates
61 const int VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage
62 const int VHF_MOVE_GROUND = 128; /// Vehicle moves on gound
63 const int VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound
64 const int VHF_MOVE_FLY = 512; /// Vehicle is airborn
65 const int VHF_DMGSHAKE = 1024; /// Add random velocity each frame if health < 50%
66 const int VHF_DMGROLL = 2048; /// Add random angles each frame if health < 50%
67 const int VHF_DMGHEADROLL = 4096; /// Add random head angles each frame if health < 50%
68 const int VHF_MULTISLOT = 8192; /// Vehicle has multiple player slots
69 const int VHF_PLAYERSLOT = 16384; /// This ent is a player slot on a multi-person vehicle