Skip to content

Commit

Permalink
allow entity ids to be handled by the server only. STOP FUCKING WITH …
Browse files Browse the repository at this point in the history
…THEM ON THE CLIENT
  • Loading branch information
InvalidArgument3 committed Oct 29, 2024
1 parent d3b5049 commit 5b15661
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 5b15661

Please sign in to comment.