mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-17 15:30:06 +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:
@@ -119,7 +119,7 @@ bool MobAI::aggroCheck(Mob *mob, time_t currTime) {
|
||||
CNSocket *closest = nullptr;
|
||||
int closestDistance = INT_MAX;
|
||||
|
||||
for (auto it = mob->viewableChunks->begin(); it != mob->viewableChunks->end(); it++) {
|
||||
for (auto it = mob->viewableChunks.begin(); it != mob->viewableChunks.end(); it++) {
|
||||
Chunk* chunk = *it;
|
||||
for (CNSocket *s : chunk->players) {
|
||||
Player *plr = PlayerManager::getPlayer(s);
|
||||
@@ -296,7 +296,7 @@ static void useAbilities(Mob *mob, time_t currTime) {
|
||||
std::vector<int> targetData = {0, 0, 0, 0, 0};
|
||||
|
||||
// find the players within range of eruption
|
||||
for (auto it = mob->viewableChunks->begin(); it != mob->viewableChunks->end(); it++) {
|
||||
for (auto it = mob->viewableChunks.begin(); it != mob->viewableChunks.end(); it++) {
|
||||
Chunk* chunk = *it;
|
||||
for (CNSocket *s : chunk->players) {
|
||||
Player *plr = PlayerManager::getPlayer(s);
|
||||
|
||||
Reference in New Issue
Block a user