projects
/
xonotic
/
xonotic-data.pk3dir.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
265179b
)
If the player has enough ammo already, don't pick up the weapon when g_weapon_stay...
author
Mario <mario.mario@y7mail.com>
Fri, 6 Mar 2020 21:19:25 +0000
(07:19 +1000)
committer
Mario <mario.mario@y7mail.com>
Fri, 6 Mar 2020 21:19:25 +0000
(07:19 +1000)
qcsrc/common/t_items.qc
patch
|
blob
|
history
diff --git
a/qcsrc/common/t_items.qc
b/qcsrc/common/t_items.qc
index df3bb9b521d3ae4a43046513e330fa0cfc138de4..bd7885d41f5273121d7956b968d2b221b2ee7211 100644
(file)
--- a/
qcsrc/common/t_items.qc
+++ b/
qcsrc/common/t_items.qc
@@
-735,7
+735,11
@@
bool Item_GiveAmmoTo(entity item, entity player, int res_type, float ammomax)
return false;
}
else if (g_weapon_stay == 2)
+ {
ammomax = min(amount, ammomax);
+ if(player_amount >= ammomax)
+ return false;
+ }
else
return false;
if (amount < 0)