Prerequisites
Game Version
Bug Description
If a non host player has a non ASCII character in their display name, their camera position will be pointed at the wrong spot upon game start.
This happens because when a match starts, the game needs to figure out which slot belongs to the local player so it can point the starting camera at their base. It does this in a fragile way by:
- Taking the local players display name
- Converting it to ASCII
- Searching all slots for a name that matches the converted result (which possibly means this can cause issues if two players have the same name, and if this is done the same way in other places like the actual start position of a CC, but I have not tested)
AsciiString slotNameAscii;
slotNameAscii.translate(slot->getName());
if (slot->isHuman() && game->getSlotNum(slotNameAscii) == game->getLocalSlotNum()) {
localSlot = i;
}
localSlot never gets updated, and stays at 0 which would be whoever is on slot 0 (the host) when the game needs to decide where to start:
GameSlot* slot = game->getSlot(localSlot);
Int startPos = slot->getStartPos();
startingCamName.format("Player_%d_Start", startPos + 1);
Reproduction Steps
- Start the game with the non host client having a non-ascii character in the name
- Camera start position will be pointed at the host's base
Additional Context
Prerequisites
Game Version
Bug Description
If a non host player has a non ASCII character in their display name, their camera position will be pointed at the wrong spot upon game start.
This happens because when a match starts, the game needs to figure out which slot belongs to the local player so it can point the starting camera at their base. It does this in a fragile way by:
localSlotnever gets updated, and stays at 0 which would be whoever is on slot 0 (the host) when the game needs to decide where to start:Reproduction Steps
Additional Context