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, bool(entity), 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 this, entity instance)) { }
41 /** (SERVER) logic to run every frame */
42 METHOD(Vehicle, vr_think, void(Vehicle this, entity instance)) { }
43 /** (SERVER) called when vehicle dies */
44 METHOD(Vehicle, vr_death, void(Vehicle this, entity instance)) { }
45 /** (BOTH) precaches models/sounds used by this vehicle */
46 METHOD(Vehicle, vr_precache, void(Vehicle this)) { }
47 /** (SERVER) called when a player enters this vehicle */
48 METHOD(Vehicle, vr_enter, void(Vehicle this, entity instance)) { }
49 /** (SERVER) called when a player enters this vehicle while occupied */
50 METHOD(Vehicle, vr_gunner_enter, void(Vehicle this, entity instance, entity actor)) { }
51 /** (SERVER) called when the vehicle re-spawns */
52 METHOD(Vehicle, vr_spawn, void(Vehicle this, entity instance)) { }
53 /** (SERVER) called when a vehicle hits something */
54 METHOD(Vehicle, vr_impact, void(Vehicle this, entity instance)) { }
55 /** (CLIENT) logic to run every frame */
56 METHOD(Vehicle, vr_hud, void(Vehicle this)) { }
57 /** (CLIENT) logic to run every frame */
58 METHOD(Vehicle, vr_crosshair, void(Vehicle thisveh, entity player)) { }
61 // vehicle spawn flags (need them here for common registrations)
62 const int VHF_ISVEHICLE = BIT(1); /// Indicates vehicle
63 const int VHF_HASSHIELD = BIT(2); /// Vehicle has shileding
64 const int VHF_SHIELDREGEN = BIT(3); /// Vehicles shield regenerates
65 const int VHF_HEALTHREGEN = BIT(4); /// Vehicles health regenerates
66 const int VHF_ENERGYREGEN = BIT(5); /// Vehicles energy regenerates
67 const int VHF_DEATHEJECT = BIT(6); /// Vehicle ejects pilot upon fatal damage
68 const int VHF_MOVE_GROUND = BIT(7); /// Vehicle moves on gound
69 const int VHF_MOVE_HOVER = BIT(8); /// Vehicle hover close to gound
70 const int VHF_MOVE_FLY = BIT(9); /// Vehicle is airborn
71 const int VHF_DMGSHAKE = BIT(10); /// Add random velocity each frame if health < 50%
72 const int VHF_DMGROLL = BIT(11); /// Add random angles each frame if health < 50%
73 const int VHF_DMGHEADROLL = BIT(12); /// Add random head angles each frame if health < 50%
74 const int VHF_MULTISLOT = BIT(13); /// Vehicle has multiple player slots
75 const int VHF_PLAYERSLOT = BIT(14); /// This ent is a player slot on a multi-person vehicle