Last opened scene only loaded on start-up in editor now, added entity.enabled check in render_default_renderable_entities-proc
This commit is contained in:
12
module.jai
12
module.jai
@@ -104,11 +104,13 @@ coven_init :: (window_title: string, window_width: u32, window_height: u32, full
|
|||||||
}
|
}
|
||||||
|
|
||||||
coven_run :: (game_update_proc: (float), game_editor_update_proc: (float), game_update_post_physics_proc: (float)) {
|
coven_run :: (game_update_proc: (float), game_editor_update_proc: (float), game_update_post_physics_proc: (float)) {
|
||||||
if engine.current_scene == null && engine.automatically_load_last_opened_scene {
|
#if EDITOR {
|
||||||
last_opened_scene := get_last_opened_scene_file();
|
if engine.current_scene == null && engine.automatically_load_last_opened_scene {
|
||||||
if last_opened_scene.count > 0 {
|
last_opened_scene := get_last_opened_scene_file();
|
||||||
engine.current_scene = load_scene(last_opened_scene);
|
if last_opened_scene.count > 0 {
|
||||||
free(last_opened_scene);
|
engine.current_scene = load_scene(last_opened_scene);
|
||||||
|
free(last_opened_scene);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1697,7 +1697,7 @@ render :: () {
|
|||||||
|
|
||||||
render_default_renderable_entities :: () {
|
render_default_renderable_entities :: () {
|
||||||
for e: engine.current_scene.entities {
|
for e: engine.current_scene.entities {
|
||||||
if e.flags & .RENDERABLE && e.renderable.use_default_pipeline {
|
if e.enabled && e.flags & .RENDERABLE && e.renderable.use_default_pipeline {
|
||||||
render_entity(e, engine.renderer.default_pipelines.entity_pipeline);
|
render_entity(e, engine.renderer.default_pipelines.entity_pipeline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user