Skip to content

Commit

Permalink
remove object on adding it to inventory fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ISPlatonov committed Jan 22, 2024
1 parent 9f08c51 commit 63250f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/Multiplayer/Multiplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ namespace Multiplayer
break;
}
data << DataType::Event << EventType::removeObject << object_data;
for (auto iter = getPlayerDataPool().begin(); iter != getPlayerDataPool().end(); ++iter)
send(data, socket_info.first, socket_info.second);
for (const auto& iter : getPlayerDataPool())
send(data, iter.second.getSocketInfo().first, iter.second.getSocketInfo().second);
data.clear();
data << DataType::Event << EventType::addObjectToInvectory << object_data;
send(data, socket_info.first, socket_info.second);
Expand Down

0 comments on commit 63250f5

Please sign in to comment.