Skip to content

Commit

Permalink
Respect the transfer items flag for ClientTravel
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Aug 30, 2024
1 parent 6770430 commit fedea31
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions SurrealEngine/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,13 @@ void Engine::Run()
if (pawn && pawn->Player())
{
Array<ObjectTravelInfo> actorTravelInfo;
for (UInventory* item = pawn->Inventory(); item != nullptr; item = item->Inventory())
if (ClientTravelInfo.TransferItems)
{
ObjectTravelInfo objInfo(item);
actorTravelInfo.push_back(std::move(objInfo));
for (UInventory* item = pawn->Inventory(); item != nullptr; item = item->Inventory())
{
ObjectTravelInfo objInfo(item);
actorTravelInfo.push_back(std::move(objInfo));
}
}
// Add the pawn itself last
actorTravelInfo.push_back(ObjectTravelInfo(pawn));
Expand Down

0 comments on commit fedea31

Please sign in to comment.