Compare commits

...

1 Commits

Author SHA1 Message Date
8ce2af89c8 fix: add visibility check to rendering implementation 2025-08-15 15:10:09 -05:00
2 changed files with 4 additions and 1 deletions

View File

@@ -48,7 +48,6 @@ pub fn input_system(bindings: Res<Bindings>, mut writer: EventWriter<GameEvent>,
Event::KeyDown { keycode: Some(key), .. } => {
let command = bindings.key_bindings.get(&key).copied();
if let Some(command) = command {
tracing::info!("triggering command: {:?}", command);
writer.write(GameEvent::Command(command));
}
}

View File

@@ -90,6 +90,10 @@ pub fn render_system(
// Render all entities to the backbuffer
for (_, renderable, position) in renderables.iter() {
if !renderable.visible {
continue;
}
let pos = position.get_pixel_pos(&map.graph);
match pos {
Ok(pos) => {