Skip to content

Commit 3c1cd29

Browse files
authored
Merge pull request #3202 from moisesjpelaez/general_fixes
General fixes
2 parents ad89e18 + a44cd53 commit 3c1cd29

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

armory/Sources/iron/App.hx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ class App {
5454
if (Scene.active == null || !Scene.active.ready) return;
5555
iron.system.Time.update();
5656

57+
// Rebuild projection on window resize
58+
if (lastw == -1) {
59+
lastw = App.w();
60+
lasth = App.h();
61+
}
62+
if (lastw != App.w() || lasth != App.h()) {
63+
if (onResize != null) onResize();
64+
else {
65+
if (Scene.active != null && Scene.active.camera != null) {
66+
Scene.active.camera.buildProjection();
67+
}
68+
}
69+
}
70+
lastw = App.w();
71+
lasth = App.h();
72+
5773
if (pauseUpdates) return;
5874

5975
#if arm_debug
@@ -97,22 +113,6 @@ class App {
97113
for (cb in endFrameCallbacks) cb();
98114
updateTime = kha.Scheduler.realTime() - startTime;
99115
#end
100-
101-
// Rebuild projection on window resize
102-
if (lastw == -1) {
103-
lastw = App.w();
104-
lasth = App.h();
105-
}
106-
if (lastw != App.w() || lasth != App.h()) {
107-
if (onResize != null) onResize();
108-
else {
109-
if (Scene.active != null && Scene.active.camera != null) {
110-
Scene.active.camera.buildProjection();
111-
}
112-
}
113-
}
114-
lastw = App.w();
115-
lasth = App.h();
116116
}
117117

118118
static function render(frames: Array<kha.Framebuffer>) {

armory/Sources/iron/Scene.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ class Scene {
903903

904904
if (StringTools.endsWith(ptype, "Object") && pval != "") {
905905
Reflect.setProperty(traitInst, pname, Scene.active.getChild(pval));
906-
} else if (ptype == "TSceneFormat" && pval != "") {
906+
} else if (ptype == "TSceneFormat" && pval != "" && pval != null) {
907907
Data.getSceneRaw(pval, function (r: TSceneFormat) {
908908
Reflect.setProperty(traitInst, pname, r);
909909
});

armory/Sources/iron/system/Time.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Time {
1414
return 1 / frequency;
1515
}
1616

17-
static var _fixedStep: Null<Float>;
17+
static var _fixedStep: Null<Float> = 1 / 60;
1818
public static var fixedStep(get, never): Float;
1919
static function get_fixedStep(): Float {
2020
return _fixedStep;

0 commit comments

Comments
 (0)