mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-10-01 02:17:35 +00:00
Fix #136
This also fixes a related issue where changes to the region were not being sent on login.
This commit is contained in:
@@ -58,13 +58,18 @@ public final class PrePlayerSynchronizationTask extends SynchronizationTask {
|
||||
Position old = player.getPosition();
|
||||
player.getWalkingQueue().pulse();
|
||||
|
||||
boolean local = true;
|
||||
|
||||
if (player.isTeleporting()) {
|
||||
player.resetViewingDistance();
|
||||
local = false;
|
||||
}
|
||||
|
||||
Position position = player.getPosition();
|
||||
|
||||
if (!player.hasLastKnownRegion() || isRegionUpdateRequired()) {
|
||||
player.setRegionChanged(true);
|
||||
local = false;
|
||||
|
||||
player.setLastKnownRegion(position);
|
||||
player.send(new RegionChangeMessage(position));
|
||||
@@ -78,7 +83,9 @@ public final class PrePlayerSynchronizationTask extends SynchronizationTask {
|
||||
differences.retainAll(oldViewable);
|
||||
|
||||
Set<RegionCoordinates> full = new HashSet<>(newViewable);
|
||||
if (local) {
|
||||
full.removeAll(oldViewable);
|
||||
}
|
||||
|
||||
sendUpdates(player.getLastKnownRegion(), differences, full);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user