ZacharyTalis / alyx-multiplayer

Multiplayer mod for Half-Life: Alyx running on Windows.
https://alyx-multiplayer.com
MIT License
37 stars 4 forks source link

commas as decimal separators make the soft crash #4

Open BBurgarella opened 2 years ago

BBurgarella commented 2 years ago

EDIT: Using int was too sloppy so I found a culture-invariat way to solve this bug (see second commit)

So, this bug might be related to the fact that I am using a french computer, the ToString() function was using commas as decimal separator, which therefore made the lines 426 create a string[6] instead of a string[2]. due to that the lines 432 and 433 did not work properly, and in the end the unparsedPos was just a string[1] which made the soft crash at line 435. I fixed this by using the IX, IY and IZ values of the Vector3f, therefore using ints and avoiding decimal separators completely