mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-25 19:42:20 +00:00
fixed dynos animations on held objects [build]
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
This commit is contained in:
parent
fb8fbd1136
commit
b5d021b231
3 changed files with 11 additions and 11 deletions
|
|
@ -8,7 +8,7 @@ extern "C" {
|
|||
#include "behavior_data.h"
|
||||
#include "pc/lua/smlua_hooks.h"
|
||||
|
||||
s8 geo_get_processing_mario_index(void);
|
||||
s8 geo_get_processing_mario_index(struct Object *obj);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -77,7 +77,7 @@ void DynOS_Anim_Swap(void *aPtr) {
|
|||
|
||||
// Animation index
|
||||
s32 _AnimIndex = -1;
|
||||
s8 index = geo_get_processing_mario_index();
|
||||
s8 index = geo_get_processing_mario_index(_Object);
|
||||
if (index != -1) {
|
||||
_AnimIndex = RetrieveCurrentMarioAnimationIndex(index);
|
||||
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ struct GraphNodeBackground *init_graph_node_background(struct DynamicPool *pool,
|
|||
: (backgroundFunc && background >= BACKGROUND_CUSTOM);
|
||||
|
||||
if (invalidBackground) {
|
||||
LOG_ERROR("invalid background id");
|
||||
LOG_ERROR("invalid background id %d", background);
|
||||
background = BACKGROUND_HAUNTED;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -334,13 +334,13 @@ static Gfx *make_gfx_mario_alpha(struct GraphNodeGenerated *node, s16 alpha) {
|
|||
}
|
||||
|
||||
// Calculates if the processing geo is a mirror mario
|
||||
static s8 geo_get_processing_mirror_mario_index() {
|
||||
ptrdiff_t ptrDiff = (struct GraphNodeObject *) gCurGraphNodeProcessingObject - gMirrorMario;
|
||||
static s8 geo_get_processing_mirror_mario_index(struct Object *obj) {
|
||||
ptrdiff_t ptrDiff = (struct GraphNodeObject *) obj - gMirrorMario;
|
||||
return (ptrDiff >= 0 && ptrDiff < MAX_PLAYERS) ? ptrDiff : -1;
|
||||
}
|
||||
|
||||
static u8 geo_get_processing_object_index(void) {
|
||||
s8 index = geo_get_processing_mirror_mario_index();
|
||||
s8 index = geo_get_processing_mirror_mario_index(gCurGraphNodeProcessingObject);
|
||||
if (index != -1) {
|
||||
return index;
|
||||
}
|
||||
|
|
@ -351,19 +351,19 @@ static u8 geo_get_processing_object_index(void) {
|
|||
return (index >= MAX_PLAYERS) ? 0 : index;
|
||||
}
|
||||
|
||||
s8 geo_get_processing_mario_index(void) {
|
||||
if (gCurGraphNodeProcessingObject == NULL) { return -1; }
|
||||
s8 geo_get_processing_mario_index(struct Object *obj) {
|
||||
if (obj == NULL) { return -1; }
|
||||
|
||||
s8 index = geo_get_processing_mirror_mario_index();
|
||||
s8 index = geo_get_processing_mirror_mario_index(obj);
|
||||
if (index != -1) {
|
||||
return index;
|
||||
}
|
||||
|
||||
if (gCurGraphNodeProcessingObject->behavior != bhvMario) {
|
||||
if (obj->behavior != bhvMario) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
index = gCurGraphNodeProcessingObject->oBehParams - 1;
|
||||
index = obj->oBehParams - 1;
|
||||
return (index >= MAX_PLAYERS) ? -1 : index;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue