]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Potentially fix a crash from flak
authorMario <zacjardine@y7mail.com>
Fri, 3 Apr 2015 17:48:13 +0000 (04:48 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 3 Apr 2015 17:48:13 +0000 (04:48 +1100)
qcsrc/common/weapons/w_flak.qc
qcsrc/common/weapons/w_porto.qc

index 4344bf79f04df288454ed95c93cf2c55a36fb771..8ed1545fc5c46dc298044d983c912b60138e67be 100644 (file)
@@ -243,7 +243,7 @@ void W_Flak_Bomb_Explode(void)
                fixedmakevectors(a + '1 0 0' * crandom() * spread_up
                                                   + '0 1 0' * crandom() * spread_side);
 
-               entity p = W_Flak_Projectile(self.owner, false,
+               entity p = W_Flak_Projectile(self.realowner, false,
                                                  WEP_CVAR_SEC(flak, damage),
                                                  WEP_CVAR_SEC(flak, gravity),
                                                  WEP_CVAR_SEC(flak, lifetime),
index ffc1aed48ae87f2e29d732613698039ef851fe60..06a53b34654dab247806f56e5df7e4d2aa688e67 100644 (file)
@@ -367,6 +367,12 @@ float W_Porto(float req)
 
                        return true;
                }
+               case WR_CHECKAMMO1:
+               case WR_CHECKAMMO2:
+               {
+                       // always allow infinite ammo
+                       return true;
+               }
                case WR_INIT:
                {
                        precache_model(W_Model("g_porto.md3"));