From 7888930bf0a75999e103f7781c095e04b6860ee5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 15 Nov 2009 15:35:59 +0000 Subject: added entity request network message --- src/game/example/spectator.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/game/example') diff --git a/src/game/example/spectator.cc b/src/game/example/spectator.cc index 93c6fdd..defc356 100644 --- a/src/game/example/spectator.cc +++ b/src/game/example/spectator.cc @@ -12,15 +12,18 @@ namespace example core::Cvar *Spectator::g_spectatorspeed = 0; core::Cvar *Spectator::g_spectatorrotation = 0; -Spectator::Spectator(core::Player *owner) : core::EntityControlable(owner) +Spectator::Spectator(core::Player *owner) : core::EntityControlable() { // default properties entity_shape = core::Entity::Diamond; set_radius(0.25f); // the spectator gets player color - get_color().assign(owner->color()); - get_color_second().assign(owner->color_second()); + if (owner) { + set_owner(owner); + get_color().assign(owner->color()); + get_color_second().assign(owner->color_second()); + } // set dirty flag set_dirty(); -- cgit v1.2.3