diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-24 16:53:57 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-24 16:53:57 +0100 |
| commit | e06df4dce05c8dd2ebd340ee1abcc8556f328d73 (patch) | |
| tree | 77d8abd10607d4b9454c92fe756331f02db4c5bc /src/scenery.cpp | |
| parent | eb4922fc429764504a7e94e8c712c368c51685f2 (diff) | |
only show hand cursor over interactible scenery
Diffstat (limited to 'src/scenery.cpp')
| -rw-r--r-- | src/scenery.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/scenery.cpp b/src/scenery.cpp index 4eed262f..7c3001b0 100644 --- a/src/scenery.cpp +++ b/src/scenery.cpp @@ -54,6 +54,19 @@ scenery::scenery(float dt, frame_t frame, rotation r, bool passable, scenery_typ delta{dt}, frame{frame}, r{r}, passable{passable}, type{type} {} +bool scenery::can_activate() const noexcept +{ + switch (type) + { + default: + return false; + case scenery_type::door: + return !active; + case scenery_type::object: + return true; + } +} + void scenery::update(float dt, const anim_atlas& anim) { if (!active) |
