CnCNet / xna-cncnet-client

XNA / MonoGame based client for playing classic Command & Conquer games both online and offline with a CnCNet game spawner.
Other
227 stars 90 forks source link

Non host cannot select America/Cuba when No Yuri/No France is enabled #465

Closed devo1929 closed 11 months ago

devo1929 commented 1 year ago

Non host players are unable to select America and Cuba when the host has enabled No Yuri/No France AND there are random selectors added via INI file. In the case of YR, those random selectors are "Allied" and "Soviet". This causes an offset of "2" when selecting your side in the issue as described below.

This is because those "disallowed side" settings (like No Yuri/No France) in their INI files (in addition to coop maps and game modes) do not account for random selectors that come from other INI files.

The result is that the non-host player selects America, the host receives the message, but discards it, because it's viewed as a disallowed side, then sends a message back to all players on current game settings, which includes the non-host player's old selected side. The non-host player then receives that message and gets "reset" back to whatever they were before they selected America.

IE: Non-host player sends side index "3" when selecting America, but the host receiving the message will see side index "3" as France when determining "disallowed sides." Non-host player sends side index "10" when selecting Cuba, but the host receiving the message will see side index "10" as Yuri when determining "disallowed sides."

Reproduction Steps: