diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:37:16 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:37:16 +0700 |
| commit | 119bff351450ea16ffda550b6e0f67379b29f708 (patch) | |
| tree | d9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.Client/PlayerChunkMap.h | |
| parent | 8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff) | |
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.Client/PlayerChunkMap.h')
| -rw-r--r-- | Minecraft.Client/PlayerChunkMap.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Minecraft.Client/PlayerChunkMap.h b/Minecraft.Client/PlayerChunkMap.h index 5e87934b..08cda2a7 100644 --- a/Minecraft.Client/PlayerChunkMap.h +++ b/Minecraft.Client/PlayerChunkMap.h @@ -25,8 +25,8 @@ public: { public: int x,z; - std::shared_ptr<ServerPlayer> player; - PlayerChunkAddRequest(int x, int z, std::shared_ptr<ServerPlayer> player ) : x(x), z(z), player(player) {} + shared_ptr<ServerPlayer> player; + PlayerChunkAddRequest(int x, int z, shared_ptr<ServerPlayer> player ) : x(x), z(z), player(player) {} }; class PlayerChunk @@ -34,7 +34,7 @@ public: friend class PlayerChunkMap; private: PlayerChunkMap *parent; // 4J added - vector<std::shared_ptr<ServerPlayer> > players; + vector<shared_ptr<ServerPlayer> > players; //int x, z; ChunkPos pos; @@ -51,25 +51,25 @@ public: ~PlayerChunk(); // 4J Added sendPacket param so we can aggregate the initial send into one much smaller packet - void add(std::shared_ptr<ServerPlayer> player, bool sendPacket = true); - void remove(std::shared_ptr<ServerPlayer> player); + void add(shared_ptr<ServerPlayer> player, bool sendPacket = true); + void remove(shared_ptr<ServerPlayer> player); void tileChanged(int x, int y, int z); void prioritiseTileChanges(); // 4J added - void broadcast(std::shared_ptr<Packet> packet); + void broadcast(shared_ptr<Packet> packet); bool broadcastChanges(bool allowRegionUpdate); // 4J - added parm private: - void broadcast(std::shared_ptr<TileEntity> te); + void broadcast(shared_ptr<TileEntity> te); }; public: - vector<std::shared_ptr<ServerPlayer> > players; + vector<shared_ptr<ServerPlayer> > players; void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added private: unordered_map<int64_t,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap vector<PlayerChunk *> changedChunks; vector<PlayerChunkAddRequest> addRequests; // 4J added - void tickAddRequests(std::shared_ptr<ServerPlayer> player); // 4J added + void tickAddRequests(shared_ptr<ServerPlayer> player); // 4J added ServerLevel *level; int radius; @@ -83,21 +83,21 @@ public: bool hasChunk(int x, int z); private: PlayerChunk *getChunk(int x, int z, bool create); - void getChunkAndAddPlayer(int x, int z, std::shared_ptr<ServerPlayer> player); // 4J added - void getChunkAndRemovePlayer(int x, int z, std::shared_ptr<ServerPlayer> player); // 4J added + void getChunkAndAddPlayer(int x, int z, shared_ptr<ServerPlayer> player); // 4J added + void getChunkAndRemovePlayer(int x, int z, shared_ptr<ServerPlayer> player); // 4J added public: - void broadcastTileUpdate(std::shared_ptr<Packet> packet, int x, int y, int z); + void broadcastTileUpdate(shared_ptr<Packet> packet, int x, int y, int z); void tileChanged(int x, int y, int z); bool isTrackingTile(int x, int y, int z); // 4J added void prioritiseTileChanges(int x, int y, int z); // 4J added - void add(std::shared_ptr<ServerPlayer> player); - void remove(std::shared_ptr<ServerPlayer> player); + void add(shared_ptr<ServerPlayer> player); + void remove(shared_ptr<ServerPlayer> player); private: bool chunkInRange(int x, int z, int xc, int zc); public: - void move(std::shared_ptr<ServerPlayer> player); + void move(shared_ptr<ServerPlayer> player); int getMaxRange(); - bool isPlayerIn(std::shared_ptr<ServerPlayer> player, int xChunk, int zChunk); + bool isPlayerIn(shared_ptr<ServerPlayer> player, int xChunk, int zChunk); static int convertChunkRangeToBlock(int radius); // AP added for Vita |
