diff options
author | Stijn Buys <ingar@osirion.org> | 2009-11-15 15:35:59 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-11-15 15:35:59 +0000 |
commit | 7888930bf0a75999e103f7781c095e04b6860ee5 (patch) | |
tree | 5e42e818366181590fedc15e06548b1e463265e7 /src/game/example | |
parent | 89c0bc88bd4ebdc44dfb99235609c90e968af533 (diff) |
added entity request network message
Diffstat (limited to 'src/game/example')
-rw-r--r-- | src/game/example/spectator.cc | 9 |
1 files changed, 6 insertions, 3 deletions
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(); |