DummyNetworkConnection _idGenerator uses ushort.MaxValue instead of int.MaxValue
Version: 14.1.4
Branch: Release (stable) branch
Timestamp: 2025/10/17 20:11:48
Server Name: N/A
Description
In NetworkManagerUtils.Dummies there is a DummyNetworkConnection which is provided to the server when spawning a dummy
To keep the connections separate and unique, it uses an int _idGenerator
However, when first instantiated, the _idGenerator uses ushort.MaxValue casted to an int instead of int.MaxValue
This doesn't provide any practical difference for anyone, it just means we can spawn 2,147,418,112 less dummies than we otherwise would be able to before an overflow error throws.
Steps to reproduce
There's a couple ways
-
Look at DummyNetworkConnection and see that the ushort.MaxValue is casted to an int in the _idGenerator
-
Spawn 2,147,549,184 dummies and get an overflow error (should be 4,294,967,296 to get an overflow error if int.MaxValue was properly used)
What is supposed to happen
It's supposed to use int.MaxValue
What actually happens
It uses ushort.MaxValue
