diff options
Diffstat (limited to 'src/game/example/spectator.cc')
-rw-r--r-- | src/game/example/spectator.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/game/example/spectator.cc b/src/game/example/spectator.cc index a2c4353..5fad0f1 100644 --- a/src/game/example/spectator.cc +++ b/src/game/example/spectator.cc @@ -15,11 +15,11 @@ Spectator::Spectator(core::Player *owner) : core::EntityControlable(owner) { // default properties entity_shape = core::Entity::Diamond; - entity_radius = 0.25f; + set_radius(0.25f); // the spectator gets player color - entity_color.assign(owner->color()); - entity_color_second.assign(owner->color_second()); + get_color().assign(owner->color()); + get_color_second().assign(owner->color_second()); // set dirty flag set_dirty(); @@ -40,9 +40,9 @@ void Spectator::frame(float elapsed) // rotate according to input float rotation = g_spectatorrotation->value() * elapsed; - entity_axis.change_direction(target_direction * rotation); - entity_axis.change_pitch(target_pitch * rotation); - entity_axis.change_roll(target_roll * rotation); + get_axis().change_direction(target_direction * rotation); + get_axis().change_pitch(target_pitch * rotation); + get_axis().change_roll(target_roll * rotation); // assign speed from thruster float maxspeed = g_spectatorspeed->value(); @@ -50,13 +50,13 @@ void Spectator::frame(float elapsed) // assign new location if (entity_speed) - entity_location += entity_axis.forward() * entity_speed * elapsed; + get_location() += axis().forward() * entity_speed * elapsed; if (target_afterburner) - entity_location += entity_axis.forward() * maxspeed * target_afterburner * elapsed; + get_location() += axis().forward() * maxspeed * target_afterburner * elapsed; if (target_strafe) - entity_location += entity_axis.left() * maxspeed * target_strafe * elapsed; + get_location() += axis().left() * maxspeed * target_strafe * elapsed; // set dirty flag set_dirty(); |