Raycaster now keeps track of the square we are aimed but _does not_ know what is there, that's the job of other things like MainUI. Closes #50.

This commit is contained in:
Zed A. Shaw 2025-06-30 12:36:00 -04:00
parent 0d79ce35b3
commit 8bbafc4d10
4 changed files with 15 additions and 12 deletions

View file

@ -31,10 +31,8 @@ namespace gui {
}
DinkyECS::Entity MainUI::camera_aim() {
auto aimed_at = $rayview.aimed_at();
if($level.collision->occupied(aimed_at)) {
return $level.collision->get(aimed_at);
if($level.collision->occupied($rayview.aiming_at)) {
return $level.collision->get($rayview.aiming_at);
} else {
return 0;
}