From a396b8680ceda71cb8988de966efb40372e484c3 Mon Sep 17 00:00:00 2001 From: Rowan Douglas Date: Sun, 10 Nov 2024 00:51:14 +0000 Subject: [PATCH] changed room_get_info to use "rotation" data for instances --- scripts/functions/Function_Room.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/functions/Function_Room.js b/scripts/functions/Function_Room.js index 93d2fcdc..b6eb54ff 100644 --- a/scripts/functions/Function_Room.js +++ b/scripts/functions/Function_Room.js @@ -144,8 +144,11 @@ function room_get_info(_ind, _views, _instances, _layers, _layer_elements, _tile //unsafe fixes inst.object_index = pObj.Name; inst.id = sourceInstance.id; + + //for some reason room instances now internally use the "rotation" variable, instead of angle + variable_struct_set(inst, "angle", sourceInstance.rotation ? sourceInstance.rotation : 0); + //variable_struct_set(inst, "angle", sourceInstance.angle ? sourceInstance.angle : 0); - variable_struct_set(inst, "angle", sourceInstance.angle ? sourceInstance.angle : 0); variable_struct_set(inst, "xscale", sourceInstance.scaleX ? sourceInstance.scaleX : 1); variable_struct_set(inst, "yscale", sourceInstance.scaleY ? sourceInstance.scaleY : 1); variable_struct_set(inst, "image_speed", sourceInstance.imageSpeed ? sourceInstance.imageSpeed : 1);