Zone flags following out of zoneError
Been like this forever. Through dozens of maps, dozens of versions of those plugins, etc.
As of yesterday (only difference is a map wipe/change) things changed. As always I move the zone to where it is for the new map. I do this BEFORE we even go live (I do it on our test server where I configure the new map). Then I copy over the data files when we go live. Been doing it this way forever and never had an issue. Until yesterday ....
Random players are being 'in the pvp zone' when nowhere near it. And even weirder is someone else could be standing right next to them and NOT be in that zone. And sometimes if they relog it goes away. Sometimes it does not.
I have completely wiped all zones. I then re-created the PVP zone, triple checked it is in the right place. But the bug is STILL happening.
And the worst part about it is, this is making players killable and lootable in places that are supposed to be safe. But even worse, only to those affected by the bug. So one person could be killed or be looted while the guy next to him (who is not experiencing the bug) cannot be harmed or looted.
This is a major problem and I just do not know what else to try to fix it. Literally have re-created the zone from scratch and nothing worked.
KEeps happeing
People keep getting considered in the PVP zone when they are clearly nowhere near it. Relogging does not solve it. I have to manually oxide.reload ZoneManager to fix it for them.
At least once per hour someone is getting this bug. It is VERY detrimental because it allows them full PVP (killing looting etc.) as if they were in our PVP zone. But the other players who are not bugged cannot fight back or do anything about it.
This is a HUGE issue. Any word on why this started happening?
Root cause is the IsInsideBounds check that is not working as it should. Players fall asleep in their base, UpdatePlayerZones kicks in and because of the faulty IsInsideBounds check, players will get added to zones they are not in. I was able to replicate it with some debugging and found a solution that is working fine for me since ~2days.
OLD Version:
private bool IsInsideBounds(Zone zone, Vector3 worldPos)
{
Vector3 localPos = zone.transform.InverseTransformPoint(worldPos);
Vector3 delta = localPos - zone.bounds.center + zone.bounds.size * 0.5f;
return Vector3.Max(Vector3.zero, delta) == Vector3.Min(delta, zone.bounds.size);
}
NEW Version:
private bool IsInsideBounds(Zone zone, Vector3 worldPos)
{
return zone.bounds.Contains(worldPos);
}
I have no idea why this started happening recently. The related code in ZoneManager is there for years...
k1llyou has updated tons of other less important plugins this week, wish he would come read this
Merged post
And actually now that I think about it, it is happening with BOTH zone shapes right now live on my server. Our PVP zone is rectangle, and our "Town" zone to prevent building is a circle. I am having players get flagged for PVP or "no build" when not in either zone randomly.
Has anyone found a good workaround for this bug? I would really like to put ZoneManager back into rotation. It seems random when players leave Zones with the Safe Zone flag, the Safe Zone flag follows with them and they can't give / recieve damage.
same problem as jankotron5000, tried with beta too not fixed, the flags I configure follow the player outside of configured zone
I am also experiencing this problem where some players are still considered to be in the "safe zone" even when they leave the zone. It doesn't apply to all players though. The affected players are still experiencing the issue after respawning and reconnecting to server.