properly check if a model is permanent
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

This commit is contained in:
Isaac0-dev 2025-06-18 17:18:27 +10:00
parent d4ca501a5c
commit 9f5ec527d8

View file

@ -276,7 +276,8 @@ size_t get_graph_node_size(s16 nodeType) {
void DynOS_Actor_RegisterModifiedGraphNode(GraphNode *aNode) {
if (sModifiedGraphNodes.find(aNode) == sModifiedGraphNodes.end()) {
if (DynOS_Model_GetModelPoolFromGraphNode(aNode) != MODEL_POOL_PERMANENT) { return; } // Only need to reset permanent models
struct GraphNode *sharedChild = geo_find_shared_child(aNode);
if (DynOS_Model_GetModelPoolFromGraphNode(sharedChild) != MODEL_POOL_PERMANENT) { return; } // Only need to reset permanent models
size_t size = get_graph_node_size(aNode->type);
if (size == 0) { return; } // Unexpected
GraphNode *graphNodeCopy = (GraphNode *) malloc(size);