diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-30 12:38:41 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-30 12:38:41 +0000 |
commit | 37a8c7aa64bdded36f452e6f95c829165d44e792 (patch) | |
tree | 61b428a69222b1942db6b996ef07903bf3a7ecbb /src/model | |
parent | dda07be1e679458aad9a82a7a2af5af13e733b32 (diff) |
moved clientside thrust and power state into render::RenderExt, added engine spawnflag to func_rotate
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/fragment.h | 9 | ||||
-rw-r--r-- | src/model/mapfile.cc | 8 | ||||
-rw-r--r-- | src/model/mapfile.h | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/src/model/fragment.h b/src/model/fragment.h index 9da30b0..31b7b96 100644 --- a/src/model/fragment.h +++ b/src/model/fragment.h @@ -113,6 +113,10 @@ public: inline const bool transform() const { return group_transform; } + + inline const bool engine() const { + return group_engine; + } inline const size_t size() const { return group_fragments.size(); @@ -128,6 +132,10 @@ public: group_type = type; } + inline void set_engine(const bool engine) { + group_engine = engine; + } + inline void set_location(const math::Vector3f &location) { group_location.assign(location); } @@ -164,6 +172,7 @@ private: float group_scale; bool group_transform; + bool group_engine; }; } diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc index 47ea354..9fbcbc5 100644 --- a/src/model/mapfile.cc +++ b/src/model/mapfile.cc @@ -150,6 +150,8 @@ MapFile::MapFile() in_patchdef = false; warning_q2brush = false; + class_engine = false; + class_speed = 0; for (size_t i = 0; i < 3; i++) { class_minbbox[i] = MAX_BOUNDS; @@ -818,6 +820,7 @@ void MapFile::clear_bbox() class_axis.clear(); class_speed = 0; + class_engine = false; } void MapFile::load_fragmentgroup(Model *model, const FragmentGroup::Type class_type) @@ -835,6 +838,7 @@ void MapFile::load_fragmentgroup(Model *model, const FragmentGroup::Type class_t // default rotation speed 45 degrees per second class_speed = 45.0f; } +// group->set_engine(class_engine); } // calculate map bbox @@ -1060,6 +1064,10 @@ Model * MapFile::load(std::string const &name) } else if (mapfile.got_key_float("roll", angle)) { mapfile.class_axis.change_roll(angle); + } else if (mapfile.got_key_int("spawnflags", u)) { + mapfile.class_engine = spawnflag_isset(u, 4); + continue; + } else if (mapfile.got_key_float("speed", mapfile.class_speed)) { continue; diff --git a/src/model/mapfile.h b/src/model/mapfile.h index 75db76e..fbb594c 100644 --- a/src/model/mapfile.h +++ b/src/model/mapfile.h @@ -171,6 +171,7 @@ private: math::Vector3f class_maxbbox; math::Axis class_axis; float class_speed; + bool class_engine; Materials map_materials; |