From a38eeccecc2815c595732b1735f875af6a1a30bb Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 5 Nov 2022 21:52:31 +1000 Subject: [PATCH] Remove linked guns --- src/game/invreset.c | 4 ++-- src/game/mplayer/scenarios.c | 1 - src/game/propobj.c | 37 ------------------------------------ src/game/setup.c | 15 +-------------- src/include/game/inv.h | 2 +- 5 files changed, 4 insertions(+), 55 deletions(-) diff --git a/src/game/invreset.c b/src/game/invreset.c index 2dada896d..9c6f194a3 100644 --- a/src/game/invreset.c +++ b/src/game/invreset.c @@ -18,9 +18,9 @@ void invReset(void) } } -void invInit(s32 numdoubles) +void invInit(void) { - g_Vars.currentplayer->equipmaxitems = numdoubles + 30; + g_Vars.currentplayer->equipmaxitems = 7; // 6 MP weapons + data uplink g_Vars.currentplayer->equipment = mempAlloc(ALIGN16(g_Vars.currentplayer->equipmaxitems * sizeof(struct invitem)), MEMPOOL_STAGE); invClear(); } diff --git a/src/game/mplayer/scenarios.c b/src/game/mplayer/scenarios.c index bb7752ba6..fedb8ce04 100644 --- a/src/game/mplayer/scenarios.c +++ b/src/game/mplayer/scenarios.c @@ -745,7 +745,6 @@ bool scenarioHighlightProp(struct prop *prop, s32 *colour) switch (obj->type) { case OBJTYPE_AMMOCRATE: case OBJTYPE_WEAPON: - case OBJTYPE_LINKGUNS: case OBJTYPE_MULTIAMMOCRATE: case OBJTYPE_SHIELD: colour[0] = 0; diff --git a/src/game/propobj.c b/src/game/propobj.c index 5709043c2..537df3772 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -12338,26 +12338,6 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass) return gdl; } -bool modelIsNodeNotTvscreen(struct modelfiledata *filedata, struct modelnode *node) -{ - if (filedata->skel == &g_SkelTerminal) { - if (modelGetPart(filedata, MODELPART_TERMINAL_0000) == node) { - return false; - } - } - - if (filedata->skel == &g_SkelCiHub) { - if (modelGetPart(filedata, MODELPART_CIHUB_0000) == node - || modelGetPart(filedata, MODELPART_CIHUB_0001) == node - || modelGetPart(filedata, MODELPART_CIHUB_0002) == node - || modelGetPart(filedata, MODELPART_CIHUB_0003) == node) { - return false; - } - } - - return true; -} - /** * Deform an object due to it being destroyed. */ @@ -18449,23 +18429,6 @@ void alarmTick(void) g_PlayersDetonatingMines = 0; } -void func0f091030(void) -{ - struct prop *prop = g_Vars.activeprops; - - while (prop) { - if (prop->type == PROPTYPE_OBJ - && (prop->flags & (PROPFLAG_ONTHISSCREENTHISTICK | PROPFLAG_ONANYSCREENTHISTICK | PROPFLAG_ONANYSCREENPREVTICK)) == 0 - && (prop->obj->hidden2 & OBJH2FLAG_DESTROYED) - && (prop->obj->hidden2 & OBJH2FLAG_80)) { - objFreePermanently(prop->obj, true); - return; - } - - prop = prop->next; - } -} - void currentPlayerDropAllItems(void) { struct chrdata *chr = g_Vars.currentplayer->prop->chr; diff --git a/src/game/setup.c b/src/game/setup.c index 2dd43d205..44f6de68a 100644 --- a/src/game/setup.c +++ b/src/game/setup.c @@ -1255,7 +1255,7 @@ void setupCreateProps(s32 stagenum) for (j = 0; j < PLAYERCOUNT(); j++) { setCurrentPlayerNum(j); - invInit(setupCountCommandType(OBJTYPE_LINKGUNS)); + invInit(); } if (g_StageSetup.props) { @@ -1768,19 +1768,6 @@ void setupCreateProps(s32 stagenum) } } break; - case OBJTYPE_LINKGUNS: - { - struct linkgunsobj *link = (struct linkgunsobj *)obj; - struct weaponobj *gun1 = (struct weaponobj *)setupGetCmdByIndex(link->offset1 + index); - struct weaponobj *gun2 = (struct weaponobj *)setupGetCmdByIndex(link->offset2 + index); - - if (gun1 && gun2 - && gun1->base.type == OBJTYPE_WEAPON - && gun2->base.type == OBJTYPE_WEAPON) { - propweaponSetDual(gun1, gun2); - } - } - break; case OBJTYPE_LINKLIFTDOOR: { struct linkliftdoorobj *link = (struct linkliftdoorobj *)obj; diff --git a/src/include/game/inv.h b/src/include/game/inv.h index 0022db45d..0868d8396 100644 --- a/src/include/game/inv.h +++ b/src/include/game/inv.h @@ -9,7 +9,7 @@ extern struct invaimsettings invaimsettings_default; extern struct weapon *g_Weapons[WEAPON_SUICIDEPILL + 1]; void invReset(void); -void invInit(s32 numdoubles); +void invInit(void); void invClear(void); void invSortItem(struct invitem *item);