Hyper Bosses (act and move twice as fast) (#2555)
* Hyper bosses * Actor* to void* + cast to fix build * Cleaner implementation * Fix enemies taking double damage * Fix smaller dodongo's being sped up * Additional fix and code cleanup * Proper fix for double damage * Extern variable -> GI state
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "objects/object_bdoor/object_bdoor.h"
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "soh/Enhancements/enemyrandomizer.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
|
||||
#if defined(_MSC_VER) || defined(__GNUC__)
|
||||
#include <string.h>
|
||||
@@ -2597,6 +2598,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
actor->colorFilterTimer--;
|
||||
}
|
||||
actor->update(actor, play);
|
||||
GameInteractor_ExecuteOnActorUpdate(actor, play);
|
||||
func_8003F8EC(play, &play->colCtx.dyna, actor);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
|
||||
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
|
||||
typedef void (*ColChkBloodFunc)(PlayState*, Collider*, Vec3f*);
|
||||
@@ -1177,6 +1178,10 @@ static ColChkResetFunc sATResetFuncs[] = {
|
||||
s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider) {
|
||||
s32 index;
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (FrameAdvance_IsEnabled(play) == true) {
|
||||
return -1;
|
||||
}
|
||||
@@ -1206,9 +1211,15 @@ s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Coll
|
||||
s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (FrameAdvance_IsEnabled(play) == true) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
sATResetFuncs[collider->shape](play, collider);
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
return -1;
|
||||
@@ -1246,6 +1257,10 @@ static ColChkResetFunc sACResetFuncs[] = {
|
||||
s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider) {
|
||||
s32 index;
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (FrameAdvance_IsEnabled(play) == true) {
|
||||
return -1;
|
||||
}
|
||||
@@ -1275,9 +1290,15 @@ s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
|
||||
s32 CollisionCheck_SetAC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (FrameAdvance_IsEnabled(play) == true) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
sACResetFuncs[collider->shape](play, collider);
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
return -1;
|
||||
@@ -1315,6 +1336,10 @@ static ColChkResetFunc sOCResetFuncs[] = {
|
||||
s32 CollisionCheck_SetOC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider) {
|
||||
s32 index;
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (FrameAdvance_IsEnabled(play) == true) {
|
||||
return -1;
|
||||
}
|
||||
@@ -1345,9 +1370,15 @@ s32 CollisionCheck_SetOC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
|
||||
*/
|
||||
s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider,
|
||||
s32 index) {
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (FrameAdvance_IsEnabled(play) == true) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ASSERT(collider->shape <= COLSHAPE_QUAD);
|
||||
sOCResetFuncs[collider->shape](play, collider);
|
||||
if (collider->actor != NULL && collider->actor->update == NULL) {
|
||||
@@ -1380,6 +1411,10 @@ s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colChkCtx,
|
||||
s32 CollisionCheck_SetOCLine(PlayState* play, CollisionCheckContext* colChkCtx, OcLine* collider) {
|
||||
s32 index;
|
||||
|
||||
if (GameInteractor_SecondCollisionUpdate()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (FrameAdvance_IsEnabled(play) == true) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user