Fixes Goron Wakeup animations#897
Conversation
|
My guess is that what actually happens is that the static animation table is not reset when all actors are reloaded. We use reset functions to reset static actor data. It may be best to try to fix it there. Further, the cvar could wrap the code in reset to apply the spin. |
|
I'll try to take a look into that, but I don't think the data that seems to be responsible for the spin is static. The morphFrames I mentioned actually get applied to calculations to a particular actor's I'll see about resetting some of these values in the reset function and see if that does anything. |
|
Yeah I'm not seeing any static info I can reset in the Goron's actor in order to prevent this spin from happening. It's gotta be something about the morphFrames, and I'm pretty sure they've been spinning since the very beginning, even before we implemented matrix interpolation. This is the only fix I'm aware of. |
| /* 12 */ ENGO2_ANIM_12 | ||
| /* 12 */ ENGO2_ANIM_12, | ||
| /* 13 */ ENGO2_ANIM_13, // Fixed Goron Wakeup Animation | ||
| /* 14 */ ENGO2_ANIM_14 //Fixed Biggoron Wakeup Animation |
There was a problem hiding this comment.
Space missing after the // in the comment
There was a problem hiding this comment.
Added this in the most recent commit.
| if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { | ||
| OnePointCutscene_Init(globalCtx, 4200, -99, &this->actor, MAIN_CAM); | ||
| Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_10); | ||
| Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ((CVar_GetS32("gGoronSpeen", 0) == 1) ? ENGO2_ANIM_10 : ENGO2_ANIM_14)); |
There was a problem hiding this comment.
I'm not sure how useful it is to keep a cvar that's not publicly exposed. While I guess some few people might want to keep this, it'll make cleanups of unused cvars harder in the future if some are "unused" on purpose.
There was a problem hiding this comment.
Well I intended it as more of an "Easter Egg" that could be enabled since people seemed to like the spinning Gorons. Since it would only be enabled for some silly fun, I was thinking later we find some semi-obscure way to expose it, like a junk hint in Rando or some kind of splash screen message. I could add a checkbox to the cheats menu if you think that would be better?
Static data reset would have nothing to do with frame interpolation. :) So in the authentic game, actor code was loaded similar to how a dll is loaded in modern programs. They'd be unloaded when all actors are removed. This loading and unloading of code would clear anything in the .data section of the overlay code. Since Ship does not use actor overlays, the static data is by default not reset and never has been. |
|
Oh I thought I remembered your first comment mentioning something about interpolation so that's why I was confused, so we're on the same page about this having nothing to do with interpolation. Must've gotten my wires crossed. By resetting static data, you're referring to something similar to what I did in #639 right? Or something else? If the latter could you point me in the right direction on where this data reset needs to occur? If it's the former there is no static data in the Goron actor that I can reset that has any effect on the spin. Believe me I've tried. |
|
Yeah, it'd be the same thing. I don't see the anim array getting changed in the code, though, so it's unlikely to be static data reset problem. In the initial PR you mention something is errantly set to -8.0f. What is that, and can you determine why? |
|
It's just what's in the code in the For the first video I posted in Discord I had changed the basic Goron Wake Up animation to the 0 index of that array instead of 1, but I later realized that the only difference between those two Maybe there's something waaaaay deeper in the code we could change but every other animation in the game I'm aware of plays fine as is, so changing anything there would require a lot of testing. |
* Fixes Goron Wakeup animations * Cleanup of some unneeded code. * Fixes comment spacing
Fixes #80
This fixes the Gorons' Wake Up animations so that they no longer spin when waking up. It seems to be related somehow to the
morphFramesbeing set to-8.0fon those animations. Changing them to0.0fon the relevant animations causes the spin to not happen. Additionally, Biggoron has a glitchy frame at the start of his animation still, so I set thestartFrameto1.0fon his and it looks pretty smooth. In order to preserve the spinny Goron behavior (since people seemed to like it) I added two new animations which are copies of the original ones with the fixes applied, and conditionally switch between them with a CVar named "gGoronSpeen" (can rename to gGoronSpin if the silliness is not appreciated). 0 is the default fixed behavior, while 1 is the old behavior. This CVar is not exposed in the UI, so you would have to edit yourshipofharkinian.jsonfor it2022-07-22.21-15-27.mp4