]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/throwing.qc
Declare more ints as ints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / throwing.qc
index 743cb8d560adafc8e4544289b5fd376156e60717..aecaafb1854111d7aa7b271f5c670ec2742b9069 100644 (file)
@@ -1,8 +1,8 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qc"
-    #include "../../dpdefs/dpextensions.qc"
+       #include "../../dpdefs/progsdefs.qh"
+    #include "../../dpdefs/dpextensions.qh"
     #include "../../common/util.qh"
     #include "../../common/weapons/weapons.qh"
     #include "throwing.qh"
@@ -40,7 +40,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
        entity oldself, wep;
        float thisammo, i;
        string s;
-       var .float ammotype = (get_weaponinfo(wpn)).ammo_field;
+       var .int ammotype = (get_weaponinfo(wpn)).ammo_field;
 
        wep = spawn();
 
@@ -50,7 +50,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
        wep.owner = wep.enemy = own;
        wep.flags |= FL_TOSSED;
        wep.colormap = own.colormap;
-       
+
        W_DropEvent(WR_DROP,own,wpn,wep);
 
        if(WepSet_FromWeapon(wpn) & WEPSET_SUPERWEAPONS)
@@ -92,7 +92,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
        wep.savenextthink = wep.nextthink;
        wep.nextthink = min(wep.nextthink, time + 0.5);
        wep.pickup_anyway = true; // these are ALWAYS pickable
-       
+
        //wa = W_AmmoItemCode(wpn);
        if(ammotype == ammo_none)
        {
@@ -194,7 +194,7 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce)
 
        W_SwitchWeapon_Force(self, w_getbestweapon(self));
        a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
-       
+
        if(!a) return;
        Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w);
 }