mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-02-03 03:40:02 +00:00
Use direct members instead of pointers for viewableChunks and buyback
We had avoided putting STL containers into Players back when we thought Players was still POD and needed to remain POD, but it turned out that neither were the case all along, so there's no need for the indirection.
This commit is contained in:
@@ -38,7 +38,7 @@ namespace PlayerManager {
|
||||
template<class T>
|
||||
void sendToViewable(CNSocket *sock, T& pkt, uint32_t type) {
|
||||
Player* plr = getPlayer(sock);
|
||||
for (auto it = plr->viewableChunks->begin(); it != plr->viewableChunks->end(); it++) {
|
||||
for (auto it = plr->viewableChunks.begin(); it != plr->viewableChunks.end(); it++) {
|
||||
Chunk* chunk = *it;
|
||||
for (CNSocket* otherSock : chunk->players) {
|
||||
if (otherSock == sock)
|
||||
|
||||
Reference in New Issue
Block a user