]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Damage factors for nex, rifle, uzi & minstanex versus vehicles
authorJakob MG <jakob_mg@hotmail.com>
Mon, 11 Jun 2012 11:22:30 +0000 (13:22 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Mon, 11 Jun 2012 11:22:30 +0000 (13:22 +0200)
qcsrc/server/vehicles/vehicles.qc
vehicles.cfg

index bfd13a0e7d52941c5494b2104d160b9d20126c73..b6ca4f943058bdbabe7cfbe2323489f2b82cde2b 100644 (file)
@@ -4,6 +4,12 @@ float autocvar_g_vehicles_delayspawn;
 float autocvar_g_vehicles_delayspawn_jitter;
 float autocvar_g_vehicles_allow_flagcarry;
 
+float autocvar_g_vehicles_nex_damagerate = 0.5;
+float autocvar_g_vehicles_uzi_damagerate = 0.5;
+float autocvar_g_vehicles_rifle_damagerate = 0.75;
+float autocvar_g_vehicles_minstanex_damagerate = 0.001;
+
+
 void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
 void vehicles_return();
 void vehicles_enter();
@@ -131,6 +137,8 @@ vector targetdrone_getnewspot()
        }
        return self.origin;
 }
+
+#if 0
 void targetdrone_think();
 void targetdrone_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
 void targetdrone_renwe()
@@ -226,6 +234,7 @@ void targetdrone_spawn(vector _where, float _autorenew)
        drone.nextthink = time + 0.1;
        drone.cnt = _autorenew;
 }
+#endif
 
 void vehicles_locktarget(float incr, float decr, float _lock_time)
 {
@@ -362,7 +371,6 @@ void vehicles_projectile_damage(entity inflictor, entity attacker, float damage,
         self.think = self.use;
         self.nextthink = time;
     }
-
 }
 
 void vehicles_projectile_explode()
@@ -829,6 +837,18 @@ void vehicles_painframe()
 void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
     self.dmg_time = time;
+    
+    if(DEATH_ISWEAPON(deathtype, WEP_NEX))
+        damage *= autocvar_g_vehicles_nex_damagerate;
+        
+    if(DEATH_ISWEAPON(deathtype, WEP_UZI))
+        damage *= autocvar_g_vehicles_uzi_damagerate;
+        
+    if(DEATH_ISWEAPON(deathtype, WEP_RIFLE))
+        damage *= autocvar_g_vehicles_rifle_damagerate;
+        
+    if(DEATH_ISWEAPON(deathtype, WEP_MINSTANEX))
+        damage *= autocvar_g_vehicles_minstanex_damagerate;
 
     if((self.vehicle_flags & VHF_HASSHIELD) && (self.vehicle_shield > 0))
     {
index e002321222044400e78d483c77fab3da2a98ea3d..67f3c5c5f593826df6b9b55cf45cc374f2c5ad84 100644 (file)
@@ -17,3 +17,8 @@ set cl_vehicles_hudscale 0.5way
 set g_vehicles_delayspawn 1
 set g_vehicles_delayspawn_jitter 10
 set g_vehicles_allow_flagcarry 1
+
+set g_vehicles_nex_damagerate 0.5
+set g_vehicles_uzi_damagerate 0.5
+set g_vehicles_rifle_damagerate 0.5
+set g_vehicles_minstanex_damagerate 0.001
\ No newline at end of file