diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/draw.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index c19dc39..46f62ca 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -671,14 +671,14 @@ void draw_model_fragments(model::Model *model, gl::scale(s, s, s); if (group->type() == model::FragmentGroup::Rotate) { - const float rotation_angle = math::degrees360f((group->engine() ? enginetime : core::application()->time()) * group->speed()); + const float rotation_angle = math::degrees360f((group->engine() ? enginetime : core::game()->time()) * group->speed()); gl::rotate(-rotation_angle, group->movement()); } else if (group->type() == model::FragmentGroup::Move ) { const float freq = group->speed() / group->distance(); math::Vector3f translation(group->movement() * group->distance()); - translation *= sinf((group->engine() ? enginetime : core::application()->time()) * M_PI * freq) * 0.5f + 0.5f; + translation *= sinf((group->engine() ? enginetime : core::game()->time()) * M_PI * freq) * 0.5f + 0.5f; gl::translate(translation); } @@ -950,6 +950,15 @@ void draw_model_axis(const core::Entity *entity) void draw_pass_model_fragments() { + /* + * FIXME + * For moving and rotating fragmentgroups, the enginetime must match + * the time used by core:: to calculate the rotation or movement + * of the asssociated collision models. + * Currently, enginetime is client-side only, and there is no way + * to sync core and render movement of fragmentgroups without sacrificing + * the functionality of the FragmentGroup::engine() flag. + */ for (core::Zone::Content::iterator it = zone->content().begin(); it != zone->content().end(); it++) { core::Entity *entity = (*it); |