Fixed metal toad corrupting held, or nearby, objects

This commit is contained in:
MysterD 2022-04-14 21:02:33 -07:00
parent a39d004584
commit 4cc80f65e2
3 changed files with 38 additions and 6 deletions

View file

@ -506,10 +506,18 @@ const GeoLayout toad_player_geo_metal_face_and_wings[] = {
const GeoLayout toad_player_geo_metal_right_hand[] = {
GEO_TRANSLATE(LAYER_OPAQUE, 100, 0, 0),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, toad_player_metal_stop),
GEO_CLOSE_NODE(),
GEO_OPEN_NODE(),
GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos),
GEO_CLOSE_NODE(),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, toad_player_metal_start),
GEO_CLOSE_NODE(),
GEO_SWITCH_CASE(0, geo_switch_mario_hand),
GEO_OPEN_NODE(),
// FISTS
@ -710,10 +718,19 @@ const GeoLayout toad_player_geo_metal_vanish_face_and_wings[] = {
const GeoLayout toad_player_geo_metal_vanish_right_hand[] = {
GEO_TRANSLATE(LAYER_TRANSPARENT, 100, 0, 0),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, toad_player_metal_stop),
GEO_CLOSE_NODE(),
GEO_OPEN_NODE(),
GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos),
GEO_CLOSE_NODE(),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, toad_player_metal_start),
GEO_CLOSE_NODE(),
GEO_SWITCH_CASE(0, geo_switch_mario_hand),
GEO_OPEN_NODE(),
// FISTS
@ -865,6 +882,11 @@ const GeoLayout toad_player_geo[] = {
GEO_ASM(1, geo_mirror_mario_backface_culling),
GEO_CLOSE_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, toad_material_revert_render_settings),
GEO_DISPLAY_LIST(LAYER_ALPHA, toad_material_revert_render_settings),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, toad_material_revert_render_settings),
GEO_CLOSE_NODE(),
GEO_END(),
};

View file

@ -1,4 +1,5 @@
extern const Gfx toad_player_metal_start[];
extern const Gfx toad_player_metal_stop[];
extern const Gfx toad_player_dl_face[];
extern const Gfx toad_player_dl_eyes_closed[];
@ -28,9 +29,10 @@ extern const Gfx toad_player_dl_head_base[];
extern const Gfx toad_player_dl_head_transparent[];
extern const Gfx toad_player_metal_dl_body[];
extern Gfx toad_material_revert_render_settings[];
#ifndef VERSION_JP
extern const Gfx toad_player_dl_face_2[];
#endif
extern const GeoLayout toad_player_geo[];
extern const GeoLayout toad_player_geo[];

View file

@ -27,12 +27,8 @@ const Gfx toad_player_metal_start[] = {
const Gfx toad_player_metal_stop[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
gsSPCopyLightEXT(1, 5),
gsSPCopyLightEXT(2, 6),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_OFF),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetAlphaCompare(G_AC_NONE),
gsSPEndDisplayList(),
};
@ -1434,3 +1430,15 @@ const Gfx toad_player_dl_foot_right_metal[] = {
gsSPEndDisplayList(),
};
Gfx toad_material_revert_render_settings[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 0),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetAlphaCompare(G_AC_NONE),
gsSPEndDisplayList(),
};