mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Zoning] Fix zone race condition (#2479)
* Testing * Separate auto shutdown fix * Revert for PR * Invalidate lock in places where zoning is cancelled
This commit is contained in:
@@ -394,6 +394,8 @@ void Client::SendZoneCancel(ZoneChange_Struct *zc) {
|
||||
zone_mode = ZoneUnsolicited;
|
||||
// reset since we're not zoning anymore
|
||||
bZoning = false;
|
||||
// remove save position lock
|
||||
m_lock_save_position = false;
|
||||
}
|
||||
|
||||
void Client::SendZoneError(ZoneChange_Struct *zc, int8 err)
|
||||
@@ -413,6 +415,8 @@ void Client::SendZoneError(ZoneChange_Struct *zc, int8 err)
|
||||
zone_mode = ZoneUnsolicited;
|
||||
// reset since we're not zoning anymore
|
||||
bZoning = false;
|
||||
// remove save position lock
|
||||
m_lock_save_position = false;
|
||||
}
|
||||
|
||||
void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instance_id, float dest_x, float dest_y, float dest_z, float dest_h, int8 ignore_r) {
|
||||
@@ -467,6 +471,8 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
||||
//Force a save so its waiting for them when they zone
|
||||
Save(2);
|
||||
|
||||
m_lock_save_position = true;
|
||||
|
||||
if (zone_id == zone->GetZoneID() && instance_id == zone->GetInstanceID()) {
|
||||
// No need to ask worldserver if we're zoning to ourselves (most
|
||||
// likely to a bind point), also fixes a bug since the default response was failure
|
||||
|
||||
Reference in New Issue
Block a user