Fix exception with trying to place entities at... NaN?

This is still a bug but it should not cause an exception on the server
This commit is contained in:
Pieter-Jan Briers
2021-01-11 10:18:32 +01:00
parent 0e00170f45
commit 38ace3c348

View File

@@ -11,6 +11,7 @@ using System.Linq;
using Robust.Shared.Enums;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Network.Messages;
@@ -88,6 +89,12 @@ namespace Robust.Server.Placement
var coordinates = msg.EntityCoordinates;
if (!coordinates.IsValid(_entityManager))
{
Logger.WarningS("placement",
$"{session} tried to place {msg.ObjType} at invalid coordinate {coordinates}");
return;
}
/* TODO: Redesign permission system, or document what this is supposed to be doing
var permission = GetPermission(session.attachedEntity.Uid, alignRcv);