From 5879cc8b2db03176972373a4f46da30ac103b725 Mon Sep 17 00:00:00 2001 From: Kai-Li Date: Wed, 27 Nov 2024 16:18:34 +0100 Subject: [PATCH] GAME: Replace lollies with holo lollies in 1LC --- code/game/g_items.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/code/game/g_items.c b/code/game/g_items.c index 5153b3fdb..6d1c75b1e 100644 --- a/code/game/g_items.c +++ b/code/game/g_items.c @@ -689,8 +689,19 @@ void FinishSpawningItem(gentity_t *ent) { ent->s.eType = ET_ITEM; ent->s.modelindex = ent->item - bg_itemlist; // store item number in modelindex - ent->s.modelindex2 = 0; // zero indicates this isn't a dropped item + // we use modified lolly assets in 1LC + if (g_gametype.integer == GT_1FCTF) { + if (ent->item->giType == IT_TEAM) { + if (ent->item->giTag == PW_REDFLAG) { + ent->s.modelindex = G_ModelIndex("models/ctl/lollipop_red_holo"); + } else if (ent->item->giTag == PW_BLUEFLAG) { + ent->s.modelindex = G_ModelIndex("models/ctl/lollipop_blue_holo"); + } + } + } + + ent->s.modelindex2 = 0; // zero indicates this isn't a dropped item ent->r.contents = CONTENTS_TRIGGER; ent->touch = Touch_Item; // using an item causes it to respawn