diff options
Diffstat (limited to 'source/game/StarWorldServer.cpp')
-rw-r--r-- | source/game/StarWorldServer.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/source/game/StarWorldServer.cpp b/source/game/StarWorldServer.cpp index a722b5a..f8acc18 100644 --- a/source/game/StarWorldServer.cpp +++ b/source/game/StarWorldServer.cpp @@ -82,7 +82,7 @@ WorldServer::~WorldServer() { } void WorldServer::setWorldId(String worldId) { - m_worldId = move(worldId); + m_worldId = std::move(worldId); } String const& WorldServer::worldId() const { @@ -90,7 +90,7 @@ String const& WorldServer::worldId() const { } void WorldServer::setUniverseSettings(UniverseSettingsPtr universeSettings) { - m_universeSettings = move(universeSettings); + m_universeSettings = std::move(universeSettings); } UniverseSettingsPtr WorldServer::universeSettings() const { @@ -117,7 +117,7 @@ void WorldServer::initLua(UniverseServer* universe) { WorldStructure WorldServer::setCentralStructure(WorldStructure centralStructure) { removeCentralStructure(); - m_centralStructure = move(centralStructure); + m_centralStructure = std::move(centralStructure); m_centralStructure.setAnchorPosition(Vec2I(m_geometry.size()) / 2); m_playerStart = Vec2F(m_centralStructure.flaggedBlocks("playerSpawn").first()) + Vec2F(0, 1); @@ -286,7 +286,7 @@ List<PacketPtr> WorldServer::removeClient(ConnectionId clientId) { } } - auto packets = move(info->outgoingPackets); + auto packets = std::move(info->outgoingPackets); m_clientInfo.remove(clientId); packets.append(make_shared<WorldStopPacket>("Removed")); @@ -367,9 +367,9 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c clientInfo->outgoingPackets.append(make_shared<GiveItemPacket>(item)); } else if (auto sepacket = as<SpawnEntityPacket>(packet)) { - auto entity = entityFactory->netLoadEntity(sepacket->entityType, move(sepacket->storeData)); - entity->readNetState(move(sepacket->firstNetState)); - addEntity(move(entity)); + auto entity = entityFactory->netLoadEntity(sepacket->entityType, std::move(sepacket->storeData)); + entity->readNetState(std::move(sepacket->firstNetState)); + addEntity(std::move(entity)); } else if (auto rdpacket = as<RequestDropPacket>(packet)) { auto drop = m_entityMap->get<ItemDrop>(rdpacket->dropEntityId); @@ -489,7 +489,7 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c } else if (auto const& clientInfo = m_clientInfo.value(connectionForEntity(entity->entityId()))) { m_entityMessageResponses[entityMessagePacket->uuid] = {clientInfo->clientId, clientId}; entityMessagePacket->fromConnection = clientId; - clientInfo->outgoingPackets.append(move(entityMessagePacket)); + clientInfo->outgoingPackets.append(std::move(entityMessagePacket)); } } @@ -500,7 +500,7 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c auto response = m_entityMessageResponses.take(entityMessageResponsePacket->uuid).second; if (response.is<ConnectionId>()) { if (auto clientInfo = m_clientInfo.value(response.get<ConnectionId>())) - clientInfo->outgoingPackets.append(move(entityMessageResponsePacket)); + clientInfo->outgoingPackets.append(std::move(entityMessageResponsePacket)); } else { if (entityMessageResponsePacket->response.isRight()) response.get<RpcPromiseKeeper<Json>>().fulfill(entityMessageResponsePacket->response.right()); @@ -529,7 +529,7 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c List<PacketPtr> WorldServer::getOutgoingPackets(ConnectionId clientId) { auto const& clientInfo = m_clientInfo.get(clientId); - return move(clientInfo->outgoingPackets); + return std::move(clientInfo->outgoingPackets); } Maybe<Json> WorldServer::receiveMessage(ConnectionId fromConnection, String const& message, JsonArray const& args) { @@ -624,7 +624,7 @@ void WorldServer::update(float dt) { m_weather.setClientVisibleRegions(clientWindows); m_weather.update(dt); for (auto projectile : m_weather.pullNewProjectiles()) - addEntity(move(projectile)); + addEntity(std::move(projectile)); if (shouldRunThisStep("liquidUpdate")) { m_liquidEngine->setProcessingLimit(m_fidelityConfig.optUInt("liquidEngineBackgroundProcessingLimit")); @@ -1563,14 +1563,14 @@ void WorldServer::updateTileEntityTiles(TileEntityPtr const& entity, bool removi if (updated) queueTileUpdates(pos); } - spaces.materials = move(passedSpaces); + spaces.materials = std::move(passedSpaces); // add new roots and update known roots entry for (auto const& rootPos : newRoots) { if (auto tile = m_tileArray->modifyTile(rootPos + entity->tilePosition())) tile->rootSource = entity->tilePosition(); } - spaces.roots = move(newRoots); + spaces.roots = std::move(newRoots); } // check whether we've broken any other nearby entities @@ -1622,7 +1622,7 @@ WorldServer::ScriptComponentPtr WorldServer::scriptContext(String const& context } RpcPromise<Vec2I> WorldServer::enqueuePlacement(List<BiomeItemDistribution> distributions, Maybe<DungeonId> id) { - return m_worldStorage->enqueuePlacement(move(distributions), id); + return m_worldStorage->enqueuePlacement(std::move(distributions), id); } ServerTile const& WorldServer::getServerTile(Vec2I const& position, bool withSignal) { @@ -1774,7 +1774,7 @@ void WorldServer::queueUpdatePackets(ConnectionId clientId) { tie(weatherDelta, clientInfo->weatherNetVersion) = m_weather.writeUpdate(clientInfo->weatherNetVersion); if (!skyDelta.empty() || !weatherDelta.empty()) - clientInfo->outgoingPackets.append(make_shared<EnvironmentUpdatePacket>(move(skyDelta), move(weatherDelta))); + clientInfo->outgoingPackets.append(make_shared<EnvironmentUpdatePacket>(std::move(skyDelta), std::move(weatherDelta))); } for (auto sector : clientInfo->pendingSectors.values()) { @@ -1861,13 +1861,13 @@ void WorldServer::queueUpdatePackets(ConnectionId clientId) { auto firstUpdate = monitoredEntity->writeNetState(); clientInfo->clientSlavesNetVersion.add(entityId, firstUpdate.second); clientInfo->outgoingPackets.append(make_shared<EntityCreatePacket>(monitoredEntity->entityType(), - entityFactory->netStoreEntity(monitoredEntity), move(firstUpdate.first), entityId)); + entityFactory->netStoreEntity(monitoredEntity), std::move(firstUpdate.first), entityId)); } } } for (auto& p : updateSetPackets) - clientInfo->outgoingPackets.append(move(p.second)); + clientInfo->outgoingPackets.append(std::move(p.second)); } void WorldServer::updateDamage(float dt) { @@ -2035,7 +2035,7 @@ void WorldServer::freshenCollision(RectI const& region) { for (auto collisionBlock : m_collisionGenerator.getBlocks(freshenRegion)) { if (auto tile = m_tileArray->modifyTile(collisionBlock.space)) - tile->collisionCache.append(move(collisionBlock)); + tile->collisionCache.append(std::move(collisionBlock)); } } } @@ -2055,7 +2055,7 @@ void WorldServer::removeEntity(EntityId entityId, bool andDie) { auto& clientInfo = pair.second; if (auto version = clientInfo->clientSlavesNetVersion.maybeTake(entity->entityId())) { ByteArray finalDelta = entity->writeNetState(*version).first; - clientInfo->outgoingPackets.append(make_shared<EntityDestroyPacket>(entity->entityId(), move(finalDelta), andDie)); + clientInfo->outgoingPackets.append(make_shared<EntityDestroyPacket>(entity->entityId(), std::move(finalDelta), andDie)); } } |