From 5e7fc73cd0b59398775603836b2753b3a868abb7 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 10 Jul 2020 21:44:10 +1000 Subject: [PATCH] Replace bullets with shells when sv_q3acompat_machineshotgunswap is enabled --- qcsrc/common/items/item/ammo.qc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qcsrc/common/items/item/ammo.qc b/qcsrc/common/items/item/ammo.qc index 739d94aca..527a7e6ef 100644 --- a/qcsrc/common/items/item/ammo.qc +++ b/qcsrc/common/items/item/ammo.qc @@ -11,4 +11,13 @@ METHOD(Shells, m_spawnfunc_hookreplace, GameItem(Shells this, entity e)) return this; } +METHOD(Bullets, m_spawnfunc_hookreplace, GameItem(Bullets this, entity e)) +{ + if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e)) + { + return ITEM_Shells; + } + return this; +} + #endif -- 2.39.2