]> git.tdb.fi Git - libs/game.git/commitdiff
Cosmetic changes
authorMikko Rasa <tdb@tdb.fi>
Sat, 13 Jan 2024 12:50:56 +0000 (14:50 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 13 Jan 2024 12:50:56 +0000 (14:50 +0200)
source/game/remotecall.h
source/game/replicator.cpp

index b8e64dd192adfd4b90dc7aa4ac62999c901f766c..07474fbd0859d9c1c3a5cf44c2e9f23c71859fdc 100644 (file)
@@ -144,7 +144,6 @@ void ReplicatedCall<P>::operator()(P &packet)
        func(packet);
 }
 
-
 template<typename P>
 void ReplicatedCall<P>::operator()(unsigned target, P &packet)
 {
index 8fefb572f2bcfe1ccfa1a2d9d387b0a38def3c99..ff47330220c26822ff899e160b153ea8413a1f20 100644 (file)
@@ -112,7 +112,7 @@ void Replicator::component_created(const Events::ComponentCreated &event)
                auto i = lower_bound_member(entities, transform, &ReplicatedEntity::transform);
                entities.emplace(i, entity, transform, zygote, possessed);
 
-               if(networking.is_server())
+               if(is_server())
                        zygote->set_entity_id(next_entity_id++);
                else if(received_entity_id!=Zygote::NO_ID)
                        zygote->set_entity_id(received_entity_id);
@@ -170,7 +170,7 @@ void Replicator::receive(const Messages::SpawnEntity &message)
                return;  // TODO report the error somehow
 
        const string &setup_name = networking.get_string(message.setup);
-       SetForScope<uint32_t> set_id(received_entity_id, message.id);
+       SetForScope set_id(received_entity_id, message.id);
        (*i)->spawn(type_name, setup_name, TransformValues(message.position, message.rotation, message.scale));
 }