Savestates, add sEffectContext (#7042)

This commit is contained in:
djevangelia
2026-08-08 22:39:09 +02:00
committed by GitHub
parent 5d1a396668
commit 982f598e01
4 changed files with 11 additions and 5 deletions
+3 -1
View File
@@ -73,7 +73,7 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
}
// SoH: dumb doo doo command to change the type of a weapon's blur on the fly. Link's Swords with unique trail colors.
void EffectBlure_ChangeType(EffectBlure* this, int type) {
void EffectBlureShip_ChangeType(EffectBlure* this, int type) {
this->trailType = type;
}
@@ -206,6 +206,7 @@ s32 EffectBlure_Update(void* thisx) {
static u8 changed = 0;
u8 reset = 0;
// SoH
switch (this->trailType) {
case TRAIL_TYPE_BOOMERANG:
if (CVarGetInteger(CVAR_COSMETIC("Trails.Boomerang.Changed"), 0)) {
@@ -322,6 +323,7 @@ s32 EffectBlure_Update(void* thisx) {
}
}
// Vanilla code from here on
if (this == NULL) {
return 0;
}
+3 -3
View File
@@ -1807,7 +1807,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
D_80126080.x = this->unk_85C * 5000.0f;
func_80090A28(this, sp124);
if (this->meleeWeaponState != 0) {
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), TRAIL_TYPE_STICK);
EffectBlureShip_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), TRAIL_TYPE_STICK);
func_800906D4(play, this, sp124);
} else {
Math_Vec3f_Copy(&this->meleeWeaponInfo[0].tip, &sp124[0]);
@@ -1829,8 +1829,8 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
D_80126080.x = 1500.0f;
} else {
D_80126080.x = sMeleeWeaponLengths[Player_GetMeleeWeaponHeld(this)];
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex),
sSwordTypes[Player_GetMeleeWeaponHeld(this)]);
EffectBlureShip_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex),
sSwordTypes[Player_GetMeleeWeaponHeld(this)]);
}
func_80090A28(this, spE4);