mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-11 14:08:37 -04:00
Remove some pointless code from bondgun functions
This commit is contained in:
+1
-19
@@ -7504,8 +7504,6 @@ void bgunTickGameplay2(void)
|
||||
} else {
|
||||
player->hands[HAND_LEFT].ejectstate = EJECTSTATE_INACTIVE;
|
||||
}
|
||||
|
||||
bgunIsUsingSecondaryFunction();
|
||||
}
|
||||
|
||||
void bgunFreeFireslotWrapper(s32 slotnum)
|
||||
@@ -7567,8 +7565,6 @@ void bgunRender(Gfx **gdlptr)
|
||||
struct player *player;
|
||||
s32 i;
|
||||
|
||||
static bool renderhand = true; // var800702dc
|
||||
|
||||
player = g_Vars.currentplayer;
|
||||
|
||||
if (player->visionmode == VISIONMODE_XRAY) {
|
||||
@@ -7627,20 +7623,6 @@ void bgunRender(Gfx **gdlptr)
|
||||
|
||||
gSPPerspNormalize(gdl++, mtx00016dcc(0, 300));
|
||||
|
||||
// There is support for guns having a TV screen on them
|
||||
// but no guns have this model part so it's not used.
|
||||
node = modelGetPart(hand->gunmodel.filedata, MODELPART_0010);
|
||||
|
||||
if (node) {
|
||||
union modelrwdata *rwdata = modelGetNodeRwData(&hand->gunmodel, modelGetPart(hand->gunmodel.filedata, MODELPART_0011));
|
||||
|
||||
if (rwdata) {
|
||||
rwdata->toggle.visible = true;
|
||||
}
|
||||
|
||||
gdl = tvscreenRender(&hand->gunmodel, node, &var8009cf88, gdl, 0, 1);
|
||||
}
|
||||
|
||||
renderdata.gdl = gdl;
|
||||
renderdata.unk30 = 4;
|
||||
|
||||
@@ -7762,7 +7744,7 @@ void bgunRender(Gfx **gdlptr)
|
||||
modelRender(&renderdata, &hand->gunmodel);
|
||||
|
||||
// Render the hand
|
||||
if (player->gunctrl.handmodeldef && renderhand) {
|
||||
if (player->gunctrl.handmodeldef) {
|
||||
s32 prevcolour = renderdata.envcolour; // 7c
|
||||
|
||||
hand->handmodel.matrices = hand->gunmodel.matrices;
|
||||
|
||||
Reference in New Issue
Block a user