]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
- Fix typo in fireball code that was causing to: * being able to shoot with primary...
authorterencehill <piuntn@gmail.com>
Mon, 4 Oct 2010 13:57:43 +0000 (15:57 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 7 Oct 2010 05:18:46 +0000 (07:18 +0200)
- Cleanup: use directly STAT_FUEL

qcsrc/client/hud.qc
qcsrc/server/w_fireball.qc

index 0f54a2857f578fe96fedd305bba7663a7aa903ee..6b21f86a4f281179cdcf8e65807908d0a832fb5c 100644 (file)
@@ -2256,12 +2256,10 @@ void HUD_HealthArmor(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float armor, health;
+       float armor, health, fuel;
        armor = getstati(STAT_ARMOR);
        health = getstati(STAT_HEALTH);
-
-       float fuel;
-       fuel = getstati(GetAmmoStat(4)); // how much fuel do we have?
+       fuel = getstati(STAT_FUEL);
 
        if(autocvar__hud_configure)
        {
index 0827d2402fc41df56d8ab42cdf575c2777a195d8..6b98d37cd7404b024f8252e55b49307d58ecf4c1 100644 (file)
@@ -323,13 +323,13 @@ float w_fireball(float req)
        {
                if (self.BUTTON_ATCK)
                if (time >= self.fireball_primarytime)
-               if (weapon_prepareattack(1, cvar("g_balance_fireball_primary_refire")))
+               if (weapon_prepareattack(0, cvar("g_balance_fireball_primary_refire")))
                {
                        W_Fireball_Attack1_Frame0();
                        self.fireball_primarytime = time + cvar("g_balance_fireball_primary_refire2");
                }
                if (self.BUTTON_ATCK2)
-               if (weapon_prepareattack(0, cvar("g_balance_fireball_secondary_refire")))
+               if (weapon_prepareattack(1, cvar("g_balance_fireball_secondary_refire")))
                {
                        W_Fireball_Attack2();
                        weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_fireball_secondary_animtime"), w_ready);