mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user