From 5113dab22d2501b235b998940a5ec299634f582c Mon Sep 17 00:00:00 2001 From: escape209 Date: Mon, 23 Sep 2024 03:53:04 +0100 Subject: [PATCH] zEntPlayer: trails funcs --- src/SB/Game/zEntPlayer.cpp | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/SB/Game/zEntPlayer.cpp b/src/SB/Game/zEntPlayer.cpp index 9e1b444e..2dd6e7d5 100644 --- a/src/SB/Game/zEntPlayer.cpp +++ b/src/SB/Game/zEntPlayer.cpp @@ -3610,6 +3610,62 @@ F32 ComputeFudge(F32 a, F32 b) return MIN(a, 1.0f); } + + +U8 BubbleBounceContrails(xAnimSingle* anim) +{ + S32 ret = 0; + xAnimState* state = anim->State; + if + ( + + ((strcmp(state->Name, "BbounceStart01") == 0) && (anim->Time >= 0.9f)) + || + (strcmp(state->Name, "BbounceAttack01") == 0) + ) + { + ret = 1; + } + return ret; +} + +U8 BubbleBashContrails(xAnimSingle* anim) +{ + S32 ret = 0; + xAnimState* state = anim->State; + if + ( + ((strcmp(state->Name, "BbashStart01") == 0) && (anim->Time >= 0.6f)) + || + (strcmp(state->Name, "BbashAttack01") == 0) || + (strcmp(state->Name, "BbashMiss01") == 0) && + (anim->Time <= 0.125f) + ) + { + ret = 1; + } + return ret; +} + +U8 StunBubbleTrail(xAnimSingle* anim) +{ + S32 ret = 0; + xAnimState* state = anim->State; + if + ( + (strcmp(state->Name, "StunFall") == 0) + || + ( + (strcmp(state->Name, "StunJump") == 0) && + (anim->Time >= 0.6f) && (anim->Time <= 1.0f) + ) + ) + { + ret = 1; + } + return ret; +} + static void load_player_ini(zPlayerSettings& ps, xModelInstance& model, xModelAssetParam* modelass, U32 params_size) {