"Shifting" entity IDs to prevent them from overlapping between different subs, loading another submarine now works without crashing
This commit is contained in:
@@ -81,7 +81,7 @@ namespace Barotrauma
|
||||
|
||||
//give an unique ID
|
||||
bool IDfound;
|
||||
id = 1;//Rand.Int(int.MaxValue);
|
||||
id = submarine == null ? (ushort)1 : submarine.IdOffset;
|
||||
do
|
||||
{
|
||||
id += 1;
|
||||
|
||||
Reference in New Issue
Block a user