Only update platforms on change
This commit is contained in:
@@ -466,7 +466,6 @@ Gfx *geo_switch_mario_hand(s32 callContext, struct GraphNode *node, UNUSED Mat4
|
||||
* (such as in the mirror room) results in a faster and desynced punch / kick animation.
|
||||
*/
|
||||
Gfx *geo_mario_hand_foot_scaler(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) {
|
||||
static s16 sMarioAttackAnimCounter = 0;
|
||||
struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node;
|
||||
struct GraphNodeScale *scaleNode = (struct GraphNodeScale *) node->next;
|
||||
struct MarioBodyState *bodyState = &gBodyStates[0];
|
||||
@@ -474,9 +473,9 @@ Gfx *geo_mario_hand_foot_scaler(s32 callContext, struct GraphNode *node, UNUSED
|
||||
if (callContext == GEO_CONTEXT_RENDER) {
|
||||
scaleNode->scale = 1.0f;
|
||||
if (asGenerated->parameter == bodyState->punchState >> 6) {
|
||||
if (sMarioAttackAnimCounter != gAreaUpdateCounter && (bodyState->punchState & 0x3F) > 0) {
|
||||
if (g_state->msMarioAttackAnimCounter != gAreaUpdateCounter && (bodyState->punchState & 0x3F) > 0) {
|
||||
bodyState->punchState -= 1;
|
||||
sMarioAttackAnimCounter = gAreaUpdateCounter;
|
||||
g_state->msMarioAttackAnimCounter = gAreaUpdateCounter;
|
||||
}
|
||||
scaleNode->scale =
|
||||
gMarioAttackScaleAnimation[asGenerated->parameter * 6 + (bodyState->punchState & 0x3F)]
|
||||
|
||||
Reference in New Issue
Block a user