mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-26 14:03:01 +00:00
Fix up DynOS actor override
This commit is contained in:
parent
e7cd7ccd6d
commit
df294c0f64
3 changed files with 8 additions and 1 deletions
|
@ -321,6 +321,7 @@ struct GraphNodeObject *init_graph_node_object(struct AllocOnlyPool *pool,
|
||||||
graphNode->animInfo.animAccel = 0x10000;
|
graphNode->animInfo.animAccel = 0x10000;
|
||||||
graphNode->animInfo.animTimer = 0;
|
graphNode->animInfo.animTimer = 0;
|
||||||
graphNode->node.flags |= GRAPH_RENDER_HAS_ANIMATION;
|
graphNode->node.flags |= GRAPH_RENDER_HAS_ANIMATION;
|
||||||
|
dynos_actor_override((void*)&graphNode->sharedChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
return graphNode;
|
return graphNode;
|
||||||
|
@ -438,6 +439,7 @@ struct GraphNodeObjectParent *init_graph_node_object_parent(struct AllocOnlyPool
|
||||||
if (graphNode != NULL) {
|
if (graphNode != NULL) {
|
||||||
init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_OBJECT_PARENT);
|
init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_OBJECT_PARENT);
|
||||||
graphNode->sharedChild = sharedChild;
|
graphNode->sharedChild = sharedChild;
|
||||||
|
dynos_actor_override((void*)&graphNode->sharedChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
return graphNode;
|
return graphNode;
|
||||||
|
@ -725,6 +727,7 @@ void geo_obj_init(struct GraphNodeObject *graphNode, void *sharedChild, Vec3f po
|
||||||
graphNode->unk4C = 0;
|
graphNode->unk4C = 0;
|
||||||
graphNode->throwMatrix = NULL;
|
graphNode->throwMatrix = NULL;
|
||||||
graphNode->animInfo.curAnim = NULL;
|
graphNode->animInfo.curAnim = NULL;
|
||||||
|
dynos_actor_override((void*)&graphNode->sharedChild);
|
||||||
|
|
||||||
graphNode->node.flags |= GRAPH_RENDER_ACTIVE;
|
graphNode->node.flags |= GRAPH_RENDER_ACTIVE;
|
||||||
graphNode->node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
graphNode->node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
||||||
|
@ -749,6 +752,7 @@ void geo_obj_init_spawninfo(struct GraphNodeObject *graphNode, struct SpawnInfo
|
||||||
graphNode->unk4C = spawn;
|
graphNode->unk4C = spawn;
|
||||||
graphNode->throwMatrix = NULL;
|
graphNode->throwMatrix = NULL;
|
||||||
graphNode->animInfo.curAnim = 0;
|
graphNode->animInfo.curAnim = 0;
|
||||||
|
dynos_actor_override((void*)&graphNode->sharedChild);
|
||||||
|
|
||||||
graphNode->node.flags |= GRAPH_RENDER_ACTIVE;
|
graphNode->node.flags |= GRAPH_RENDER_ACTIVE;
|
||||||
graphNode->node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
graphNode->node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
||||||
|
|
|
@ -70,7 +70,9 @@ void register_scene_graph_node(struct GraphNode *graphNode) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gCurGraphNodeList[gCurGraphNodeIndex - 1]->type == GRAPH_NODE_TYPE_OBJECT_PARENT) {
|
if (gCurGraphNodeList[gCurGraphNodeIndex - 1]->type == GRAPH_NODE_TYPE_OBJECT_PARENT) {
|
||||||
((struct GraphNodeObjectParent *) gCurGraphNodeList[gCurGraphNodeIndex - 1])->sharedChild = graphNode;
|
struct GraphNodeObjectParent* objParent = ((struct GraphNodeObjectParent *) gCurGraphNodeList[gCurGraphNodeIndex - 1]);
|
||||||
|
objParent->sharedChild = graphNode;
|
||||||
|
dynos_actor_override((void*)&objParent->sharedChild);
|
||||||
} else {
|
} else {
|
||||||
geo_add_child(gCurGraphNodeList[gCurGraphNodeIndex - 1], graphNode);
|
geo_add_child(gCurGraphNodeList[gCurGraphNodeIndex - 1], graphNode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -761,6 +761,7 @@ Gfx* geo_render_mirror_mario(s32 callContext, struct GraphNode* node, UNUSED Mat
|
||||||
if (mario->header.gfx.pos[0] > 1700.0f) {
|
if (mario->header.gfx.pos[0] > 1700.0f) {
|
||||||
// TODO: Is this a geo layout copy or a graph node copy?
|
// TODO: Is this a geo layout copy or a graph node copy?
|
||||||
gMirrorMario[i].sharedChild = mario->header.gfx.sharedChild;
|
gMirrorMario[i].sharedChild = mario->header.gfx.sharedChild;
|
||||||
|
dynos_actor_override((void*)&gMirrorMario[i].sharedChild);
|
||||||
gMirrorMario[i].areaIndex = mario->header.gfx.areaIndex;
|
gMirrorMario[i].areaIndex = mario->header.gfx.areaIndex;
|
||||||
vec3s_copy(gMirrorMario[i].angle, mario->header.gfx.angle);
|
vec3s_copy(gMirrorMario[i].angle, mario->header.gfx.angle);
|
||||||
vec3f_copy(gMirrorMario[i].pos, mario->header.gfx.pos);
|
vec3f_copy(gMirrorMario[i].pos, mario->header.gfx.pos);
|
||||||
|
|
Loading…
Reference in a new issue