Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gs.Map.HasData always returns true #35

Open
zzhabib opened this issue Jul 9, 2021 · 1 comment
Open

gs.Map.HasData always returns true #35

zzhabib opened this issue Jul 9, 2021 · 1 comment

Comments

@zzhabib
Copy link

zzhabib commented Jul 9, 2021

When using gs.Map.HasData to detect whether the user is in game or on the main menu, I noticed that it seems to always return true regardless of condition. I did find a workaround which is to use gs.Map.JSON.Equals("{}") which will return true if when the player is on the main menu.

@spreedated
Copy link

Just use something like if (gs.Map.Phase != CSGSI.Nodes.MapPhase.Live) to check if the player is in a match or not.

VulcanShot added a commit to VulcanShot/CSGSI that referenced this issue Dec 27, 2023
The constructor already checks whether the object is empty. Since the information is read-only, set `HasData` from there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants