diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-19 10:42:54 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-19 10:42:54 +0100 |
| commit | 61d46a790cfde35bedf4283cbbcce06639cce1ec (patch) | |
| tree | ffdbda2cb8fc4e47144aa25458e8191488cea478 /src/scenery.cpp | |
| parent | b93313e438c7b943e506f3c16675e5d38edd0537 (diff) | |
src/entity: move type data member to vtable
Diffstat (limited to 'src/scenery.cpp')
| -rw-r--r-- | src/scenery.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/scenery.cpp b/src/scenery.cpp index a424351f..bfa69142 100644 --- a/src/scenery.cpp +++ b/src/scenery.cpp @@ -100,6 +100,8 @@ bool scenery_proto::operator==(const entity_proto& e0) const closing == s0.closing && interactive == s0.interactive; } +entity_type scenery::type() const noexcept { return entity_type::scenery; } + scenery::operator scenery_proto() const { scenery_proto ret; @@ -111,11 +113,10 @@ scenery::operator scenery_proto() const return ret; } -scenery::scenery(object_id id, struct chunk& c, entity_type type_, const scenery_proto& proto) : - entity{id, c, type_, proto}, sc_type{proto.sc_type}, active{proto.active}, +scenery::scenery(object_id id, struct chunk& c, const scenery_proto& proto) : + entity{id, c, proto}, sc_type{proto.sc_type}, active{proto.active}, closing{proto.closing}, interactive{proto.interactive} { - fm_assert(type == proto.type); } } // namespace floormat |
