From 095293d2b1b2fa58d761f72ec05d1660a87501b8 Mon Sep 17 00:00:00 2001 From: escape209 Date: Mon, 23 Sep 2024 03:59:07 +0100 Subject: [PATCH] zEntPlayer: trails stuff --- src/SB/Game/zEntPlayer.cpp | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/SB/Game/zEntPlayer.cpp b/src/SB/Game/zEntPlayer.cpp index 9871cd1c..a656b85d 100644 --- a/src/SB/Game/zEntPlayer.cpp +++ b/src/SB/Game/zEntPlayer.cpp @@ -3576,6 +3576,60 @@ static U32 count_talk_anims(xAnimTable* anims) return talkAnimCount; } +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) {