mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-10 12:34:06 +01:00
Tunnel fix
This commit is contained in:
parent
241f08251d
commit
8ec0e7b9c0
@ -33,7 +33,7 @@
|
||||
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
|
||||
VERSION = 1140;
|
||||
SAVEFILE_VERSION = 1400;
|
||||
VERSION_STRING = "1.14.0pr8.2";
|
||||
VERSION_STRING = "1.14.0pr8.3";
|
||||
|
||||
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES;
|
||||
|
||||
|
@ -340,7 +340,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||
if(!active) return false;
|
||||
if(!renderActive) return false;
|
||||
|
||||
var _startNode = true;
|
||||
for(var j = 0; j < ds_list_size(inputs); j++) {
|
||||
var _in = inputs[| j];
|
||||
if( _in.type == VALUE_TYPE.node) continue;
|
||||
@ -349,8 +348,10 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||
if( val_from == noone) continue;
|
||||
if(!val_from.node.active) continue;
|
||||
if(!val_from.node.renderActive) continue;
|
||||
if(!val_from.node.rendered && !val_from.node.update_on_frame)
|
||||
if(!val_from.node.rendered && !val_from.node.update_on_frame) {
|
||||
//LOG_LINE_IF(global.RENDER_LOG && name == "Tunnel Out", "Non renderable because: " + string(val_from.node.name));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -126,9 +126,8 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||
var k = ds_map_find_first(TUNNELS_OUT);
|
||||
|
||||
repeat(amo) {
|
||||
if(TUNNELS_OUT[? k] == _key) {
|
||||
if(TUNNELS_OUT[? k] == _key)
|
||||
array_push(nodes, NODE_MAP[? k]);
|
||||
}
|
||||
|
||||
k = ds_map_find_next(TUNNELS_OUT, k);
|
||||
}
|
||||
|
@ -23,7 +23,9 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||
|
||||
static isRenderable = function() {
|
||||
var _key = inputs[| 0].getValue();
|
||||
return !ds_map_exists(TUNNELS_IN, _key);
|
||||
if(!ds_map_exists(TUNNELS_IN, _key)) return false;
|
||||
|
||||
return TUNNELS_IN[? _key].node.rendered;
|
||||
}
|
||||
|
||||
static onDrawNodeBehind = function(_x, _y, _mx, _my, _s) {
|
||||
|
@ -111,13 +111,12 @@ function Render(partial = false, runAction = false) {
|
||||
// render forward
|
||||
while(!ds_queue_empty(RENDER_QUEUE)) {
|
||||
rendering = ds_queue_dequeue(RENDER_QUEUE);
|
||||
var renderable = rendering.isRenderable();
|
||||
|
||||
LOG_BLOCK_START();
|
||||
LOG_IF(global.RENDER_LOG, "Rendering " + rendering.name + " (" + rendering.display_name + ")");
|
||||
|
||||
var txt = rendering.isRenderable()? " [Update]" : " [Skip]";
|
||||
LOG_IF(global.RENDER_LOG, "Rendering " + rendering.name + " (" + rendering.display_name + ") ");
|
||||
|
||||
if(rendering.isRenderable()) {
|
||||
if(renderable) {
|
||||
rendering.doUpdate();
|
||||
|
||||
var nextNodes = rendering.getNextNodes();
|
||||
@ -128,7 +127,7 @@ function Render(partial = false, runAction = false) {
|
||||
rendering.inspector1Update();
|
||||
}
|
||||
|
||||
LOG_IF(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + txt);
|
||||
LOG_IF(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + (renderable? " [Update]" : " [Skip]"));
|
||||
LOG_BLOCK_END();
|
||||
}
|
||||
} catch(e)
|
||||
|
Loading…
Reference in New Issue
Block a user