1
0
Fork 0

Bugfix for volcano code

This commit is contained in:
Thorsten Renk 2017-09-25 09:19:18 +03:00
parent 91db77595d
commit b2729f61fe
2 changed files with 7 additions and 7 deletions

View file

@ -31,7 +31,7 @@
puu_oo_state_manager = func {
print ("Puu Oo state manager");
#print ("Puu Oo state manager");
var state = getprop("/environment/volcanoes/kilauea/puu-oo-activity");
if (state == 3)
@ -51,4 +51,4 @@
puu_oo_state_manager();
setlistener("/environment/volcanoes/kilauea/puu-oo-activity", puu_oo_state_manager);
setlistener("/environment/volcanoes/kilauea/puu-oo-activity", puu_oo_state_manager);

View file

@ -1,4 +1,4 @@
var stromboli_loop_flag = 1;
var stromboli_loop_flag = 0;
var stromboli_central_factor = 1.0;
var stromboli_side_factor = 1.0;
@ -72,7 +72,7 @@
stromboli_state_manager = func {
print ("Stromboli state manager");
#print ("Stromboli state manager");
var state1 = getprop("/environment/volcanoes/stromboli/central-activity");
var state2 = getprop("/environment/volcanoes/stromboli/side-activity");
@ -102,13 +102,13 @@
var state = state1;
if (state2 > state) {state = state2;}
if (state > 1)
if ((state > 1) and (stromboli_loop_flag == 0))
{
print("Starting Stromboli eruption simulation.");
stromboli_loop_flag = 1;
stromboli_loop(0.0, 0.0, 0.0, 0.0);
}
else
else if (state <= 1)
{
stromboli_loop_flag = 0;
}
@ -119,4 +119,4 @@
stromboli_state_manager();
setlistener("/environment/volcanoes/stromboli/central-activity", stromboli_state_manager);
setlistener("/environment/volcanoes/stromboli/side-activity", stromboli_state_manager);
setlistener("/environment/volcanoes/stromboli/side-activity", stromboli_state_manager);