{
if(self.weapons & W_WeaponBit(j))
if(W_IsWeaponThrowable(j))
- W_ThrowNewWeapon(self, j, FALSE, self.origin, randomvec() * 175 + '0 0 325');
+ W_ThrowNewWeapon(self, j, FALSE, org, randomvec() * 175 + '0 0 325');
}
}
else
- W_ThrowWeapon(randomvec() * 125 + '0 0 200', org - self.origin, FALSE);
+ {
+ if(W_IsWeaponThrowable(self.weapon))
+ W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
+ }
}
void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
float W_IsWeaponThrowable(float w)
{
float wb, wa;
+
+ if (!autocvar_g_pickup_items)
+ return 0;
+ if (g_weaponarena)
+ return 0;
+ if (g_lms)
+ return 0;
+ if (g_ca)
+ return 0;
+ if (g_cts)
+ return 0;
+ if (g_nexball && w == WEP_GRENADE_LAUNCHER)
+ return 0;
+
wb = W_WeaponBit(w);
if(!wb)
return 0;
return; // just in case
if(MUTATOR_CALLHOOK(ForbidThrowCurrentWeapon))
return;
- if (g_weaponarena)
- return;
- if (g_lms)
- return;
- if (g_nexball && w == WEP_GRENADE_LAUNCHER)
- return;
- if (!autocvar_g_pickup_items)
- return;
- if (g_ca)
- return;
- if (g_cts)
- return;
if(!autocvar_g_weapon_throwable)
return;
if(autocvar_g_weapon_stay == 1)
return;
- if(!W_IsWeaponThrowable(w))
+ if(self.weaponentity.state != WS_READY)
return;
- if(self.deadflag == DEAD_NO && self.weaponentity.state != WS_READY)
+ if(!W_IsWeaponThrowable(w))
return;
wb = W_WeaponBit(w);
a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
if not(a)
return;
- if(self.health >= 1)
- {
- if(a == "")
- sprint(self, strcat("You dropped the ^2", W_Name(w), "\n"));
- else
- sprint(self, strcat("You dropped the ^2", W_Name(w), " with ", a, "\n"));
- }
+ if(a == "")
+ sprint(self, strcat("You dropped the ^2", W_Name(w), "\n"));
+ else
+ sprint(self, strcat("You dropped the ^2", W_Name(w), " with ", a, "\n"));
};
// Bringed back weapon frame