- The server doesn't disable client-controlled AI characters that are far from all other players.
- Clients aren't allowed to flip swimming FishAnimControllers unless the server says so (occasionally caused creatures to flip around constantly because the clients ignore the 1-second "flipping cooldown"). - Moved Character.ReadStatus to the client project.
This commit is contained in:
@@ -1314,7 +1314,9 @@ namespace Barotrauma
|
||||
//disable AI characters that are far away from all clients and the host's character and not controlled by anyone
|
||||
c.Enabled =
|
||||
c == controlled ||
|
||||
c.IsRemotePlayer ||
|
||||
CharacterList.Any(c2 =>
|
||||
c != c2 &&
|
||||
(c2.IsRemotePlayer || c2 == GameMain.Server.Character) &&
|
||||
Vector2.DistanceSquared(c2.WorldPosition, c.WorldPosition) < NetConfig.CharacterIgnoreDistanceSqr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user