Decoupled player and NPC view distance.

This commit is contained in:
2020-08-26 04:53:27 +02:00
parent 3e5101892b
commit 4178945abe
5 changed files with 10 additions and 6 deletions

View File

@@ -85,7 +85,7 @@ void PlayerManager::updatePlayerPosition(CNSocket* sock, int X, int Y, int Z) {
int diffX = abs(pair.second.plr->x - X); // the map is like a grid, X and Y are your position on the map, Z is the height. very different from other games...
int diffY = abs(pair.second.plr->y - Y);
if (diffX < settings::VIEWDISTANCE && diffY < settings::VIEWDISTANCE) {
if (diffX < settings::PLAYERDISTANCE && diffY < settings::PLAYERDISTANCE) {
yesView.push_back(pair.first);
}
else {