]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/vehicles/vehicle.qc
s/WEP_(ID)/WEP_$1.m_id/
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / vehicle.qc
index b7ec7685cfb6c97df2f9922e90e068c57be1a56e..cf9695a94b091dccc39bc325d438f8519adb41ba 100644 (file)
@@ -1,6 +1,6 @@
 #include "vehicle.qh"
 
-#include "../_.qh"
+#include "../_all.qh"
 #include "../cl_player.qh"
 #include "../../common/constants.qh"
 #include "../waypointsprites.qh"
@@ -32,7 +32,7 @@ void vehicles_setreturn();
     Send additional points of interest to be drawn, to vehicle owner
 **/
 const float MAX_AXH = 4;
-.entity AuxiliaryXhair[MAX_AXH];
+.entity AuxiliaryXhairs[MAX_AXH];
 
 float SendAuxiliaryXhair(entity to, int sf)
 {
@@ -60,7 +60,7 @@ void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id)
     entity axh;
 
     axh_id = bound(0, axh_id, MAX_AXH);
-    axh = own.(AuxiliaryXhair[axh_id]);
+    axh = own.(AuxiliaryXhairs[axh_id]);
 
     if(axh == world || wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
     {
@@ -74,7 +74,7 @@ void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id)
     setorigin(axh, loc);
     axh.colormod            = clr;
     axh.SendFlags           = 0x01;
-    own.(AuxiliaryXhair[axh_id]) = axh;
+    own.(AuxiliaryXhairs[axh_id]) = axh;
 }
 
 /*
@@ -645,6 +645,7 @@ void vehicles_enter()
     self.owner.vehicle_ammo2    = self.vehicle_ammo2;
     self.owner.vehicle_reload1  = self.vehicle_reload1;
     self.owner.vehicle_reload2  = self.vehicle_reload2;
+    self.owner.vehicle_energy   = self.vehicle_energy;
 
     // Cant do this, hides attached objects too.
     //self.exteriormodeltoclient = self.owner;
@@ -903,19 +904,19 @@ void vehicles_damage(entity inflictor, entity attacker, float damage, int deatht
     self.dmg_time = time;
 
        // WEAPONTODO
-    if(DEATH_ISWEAPON(deathtype, WEP_VORTEX))
+    if(DEATH_ISWEAPON(deathtype, WEP_VORTEX.m_id))
         damage *= autocvar_g_vehicles_vortex_damagerate;
 
-    if(DEATH_ISWEAPON(deathtype, WEP_MACHINEGUN))
+    if(DEATH_ISWEAPON(deathtype, WEP_MACHINEGUN.m_id))
         damage *= autocvar_g_vehicles_machinegun_damagerate;
 
-    if(DEATH_ISWEAPON(deathtype, WEP_RIFLE))
+    if(DEATH_ISWEAPON(deathtype, WEP_RIFLE.m_id))
         damage *= autocvar_g_vehicles_rifle_damagerate;
 
-    if(DEATH_ISWEAPON(deathtype, WEP_VAPORIZER))
+    if(DEATH_ISWEAPON(deathtype, WEP_VAPORIZER.m_id))
         damage *= autocvar_g_vehicles_vaporizer_damagerate;
 
-    if(DEATH_ISWEAPON(deathtype, WEP_SEEKER))
+    if(DEATH_ISWEAPON(deathtype, WEP_SEEKER.m_id))
         damage *= autocvar_g_vehicles_tag_damagerate;
 
     self.enemy = attacker;