Open sprunk opened 3 weeks ago
Hey @sprunk, Can I pick this issue?
sure
@sprunk, Should I create an appropriate file for new IDs
or keep them in the GlobalConstants.h
?
IMO better to keep them in GlobalConstants.h
because they are global constants
Got it. Thank You.
Right now special player ID constants are spread all over the codebase. https://github.com/beyond-all-reason/spring/blob/747f18b2222860ae264853aa062c5b3d9b164e25/rts/Sim/Misc/GlobalConstants.h#L71 https://github.com/beyond-all-reason/spring/blob/747f18b2222860ae264853aa062c5b3d9b164e25/rts/Game/ChatMessage.h#L23-L25 https://github.com/beyond-all-reason/spring/blob/747f18b2222860ae264853aa062c5b3d9b164e25/rts/Net/GameServer.h#L28
This is confusing (see e.g. #1501). Put them all together.
This also applies to other things with an ID. In particular
MAX_AIS
has dual use as a special ID and as the limit for non-special IDs, split it into two and keep them adjacent to each other.