From 5b156613930e7753aea51b13252c029de84b3ffe Mon Sep 17 00:00:00 2001 From: InvalidArgument3 Date: Tue, 29 Oct 2024 04:39:20 -0500 Subject: [PATCH] allow entity ids to be handled by the server only. STOP FUCKING WITH THEM ON THE CLIENT --- .../DynamicAsteroids/AsteroidEntities/AsteroidEntity.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidEntities/AsteroidEntity.cs b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidEntities/AsteroidEntity.cs index 2ac35d1..de90ec1 100644 --- a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidEntities/AsteroidEntity.cs +++ b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidEntities/AsteroidEntity.cs @@ -87,7 +87,8 @@ public class AsteroidEntity : MyEntity, IMyDestroyableObject { public static AsteroidEntity CreateAsteroid(Vector3D position, float size, Vector3D initialVelocity, AsteroidType type, Quaternion? rotation = null, long? entityId = null) { var ent = new AsteroidEntity(); try { - if (entityId.HasValue) + // Only set EntityId if we're the server + if (entityId.HasValue && MyAPIGateway.Session.IsServer) ent.EntityId = entityId.Value; var massRange = AsteroidSettings.MinMaxMassByType[type];