More sanity checks to make sure clients aren't doing something they're not allowed to:
- AICharacter, hull, structure and submarine updates from clients are ignored - character updates from anyone else than the client controlling the character are ignored - players can't pick/drop items from anyone else's inventory (unless the target is unconscious/stunned/cuffed) - server has authority over reactor temperature
This commit is contained in:
@@ -793,11 +793,13 @@ namespace Barotrauma
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void ReadNetworkData(NetworkEventType type, NetIncomingMessage message, float sendingTime, out object data)
|
||||
public override bool ReadNetworkData(NetworkEventType type, NetIncomingMessage message, float sendingTime, out object data)
|
||||
{
|
||||
data = null;
|
||||
|
||||
if (sendingTime < lastUpdate) return;
|
||||
if (GameMain.Server != null) return false;
|
||||
|
||||
if (sendingTime < lastUpdate) return false;
|
||||
|
||||
// int sectionCount = message.ReadByte();
|
||||
|
||||
@@ -812,6 +814,8 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
lastUpdate = sendingTime;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user