Clients can access the inventories of incapacitated characters (e.g. put handcuffs on a stunned player, grab stuff from a dead character's inventory)

This commit is contained in:
Regalis
2017-04-04 21:18:03 +03:00
parent 6895cdbd7d
commit 0f8e6440ef
2 changed files with 20 additions and 9 deletions
@@ -277,18 +277,18 @@ namespace Barotrauma
{
if (GameMain.Server == null) return;
if (c.Character != this)
{
#if DEBUG
DebugConsole.Log("Received a character update message from a client who's not controlling the character");
#endif
return;
}
switch (type)
{
case ClientNetObject.CHARACTER_INPUT:
if (c.Character != this)
{
#if DEBUG
DebugConsole.Log("Received a character update message from a client who's not controlling the character");
#endif
return;
}
UInt16 networkUpdateID = msg.ReadUInt16();
byte inputCount = msg.ReadByte();
@@ -345,6 +345,14 @@ namespace Barotrauma
}
else
{
if (c.Character != this)
{
#if DEBUG
DebugConsole.Log("Received a character update message from a client who's not controlling the character");
#endif
return;
}
bool doingCPR = msg.ReadBoolean();
AnimController.Anim = doingCPR ? AnimController.Animation.CPR : AnimController.Animation.None;
}