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:
parent
0d79ce35b3
commit
8bbafc4d10
4 changed files with 15 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue