]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/vehicles/vehicles_def.qh
g_vehicle_name 1/0 do dis/en-anble specific vehicles. More work towards multislot...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicles_def.qh
index b9d9fb4a6d068dde6ab06bbe8fa6e79e4803d6b0..ed7bd15dda55b64e509121b5611065c16109d7e7 100644 (file)
@@ -12,35 +12,38 @@ float VHF_DEATHEJECT    = 64;   /// Vehicle ejects pilot upon fatal damage
 float VHF_MOVE_GROUND   = 128;  /// Vehicle moves on gound
 float VHF_MOVE_HOVER    = 256;  /// Vehicle hover close to gound
 float VHF_MOVE_FLY      = 512;  /// Vehicle is airborn
-float VHF_DMGSHAKE      = 1024;
-float VHF_DMGROLL       = 2048;
-float VHF_DMGHEADROLL   = 4096;
+float VHF_DMGSHAKE      = 1024; /// Add random velocity each frame if health < 50%
+float VHF_DMGROLL       = 2048; /// Add random angles each frame if health < 50%
+float VHF_DMGHEADROLL   = 4096; /// Add random head angles each frame if health < 50%
+float VHF_MULTISLOT     = 8192; /// Vehicle has multiple player slots
+float VHF_PLAYERSLOT    = 16384;    /// This ent is a player slot on a multi-person vehicle
 
 .entity gun1;
 .entity gun2;
 .entity gun3;
+.entity vehicle_shieldent;  /// Entity to disply the shild effect on damage
+.entity vehicle;
+.entity vehicle_viewport;
+.entity vehicle_hudmodel;
+.entity vehicle_controller;
+.entity vehicle_pilot;
 
 .float vehicle_health;      /// If self is player this is 0..100 indicating precentage of health left on vehicle. If self is vehile, this is the real health value.
 .float vehicle_energy;      /// If self is player this is 0..100 indicating precentage of energy left on vehicle. If self is vehile, this is the real energy value.
 .float vehicle_shield;      /// If self is player this is 0..100 indicating precentage of shield left on vehicle. If self is vehile, this is the real shield value.
-.entity vehicle_shieldent;  /// Entity to disply the shild effect on damage
 
 .float vehicle_ammo1;   /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo1 value.
 .float vehicle_reload1; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload1 value.
 .float vehicle_ammo2;   /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo2 value.
 .float vehicle_reload2; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload2 value.
 
-.entity vehicle;
-.entity vehicle_viewport;
-.entity vehicle_hudmodel;
-
 .float sound_nexttime;
 #define VOL_VEHICLEENGINE 1
 
 .float hud;
 .float dmg_time;
 .float  vehicle_respawntime;
-.void() vehicle_spawn;
+//.void() vehicle_spawn;
 
 void vehicles_exit(float eject);
 var .void(float exit_flags) vehicle_exit;
@@ -54,11 +57,15 @@ float SVC_UPDATEENTITY  = 128; // Net.Protocol 0x80
 
 var .void() vehicle_enter;  /// Vehicles custom funciton to be executed when owner exit it
 var .void() vehicle_die;    /// Vehicles custom function to be executed when vehile die
-var .void() vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
+#define VHSF_NORMAL 0
+#define VHSF_FACTORY 2
+var .void(float _spawnflag) vehicle_spawn;  /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
 const var .float(float _imp) vehicles_impusle_null;
 var .float(float _imp) vehicles_impusle;
 .float vehicle_weapon2mode = volly_counter;
 
+//ยง var .void() vehicle_factory()
+
 #ifdef VEHICLES_USE_ODE
 void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
 void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply a force from certain origin, length of force vector is power of force