From d48fb25c34de1f5b137927b8cbd2cb3293d2e1fb Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 4 Apr 2015 04:48:13 +1100 Subject: [PATCH] Potentially fix a crash from flak --- qcsrc/common/weapons/w_flak.qc | 2 +- qcsrc/common/weapons/w_porto.qc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/weapons/w_flak.qc b/qcsrc/common/weapons/w_flak.qc index 4344bf79f..8ed1545fc 100644 --- a/qcsrc/common/weapons/w_flak.qc +++ b/qcsrc/common/weapons/w_flak.qc @@ -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), diff --git a/qcsrc/common/weapons/w_porto.qc b/qcsrc/common/weapons/w_porto.qc index ffc1aed48..06a53b346 100644 --- a/qcsrc/common/weapons/w_porto.qc +++ b/qcsrc/common/weapons/w_porto.qc @@ -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")); -- 2.39.2