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

Player equipment incorrect #472

Closed
micvbang opened this issue Nov 14, 2023 · 13 comments
Closed

Player equipment incorrect #472

micvbang opened this issue Nov 14, 2023 · 13 comments

Comments

@micvbang
Copy link
Contributor

I'm currently investigating players having incorrect equipment reported by both GameState().Weapons() and GameState(),Participants().Playing() -> player.Weapons().
I've got a few demos where this is incorrect. I've specifically looked at inferno for this match: https://www.hltv.org/matches/2367571/virtuspro-vs-ecstatic-cct-east-europe-series-3

It happens during bomb time in round 8:

Second 1183.69 "Nodios" has knife, glock, ak47, flash but Player.Weapons() reports it as knife, glock, ak47, smoke (incorrectly reporting smoke instead of flash)

Then "Nodios" picks drops his glock and picks up a desert eagle.

Second 1185.09 "Nodios" has knife, desert eagle, ak47, flash but Player.Weapons() reports it as knife, desert eagle, smoke (missing ak47 and incorrectly reporting smoke instead of flash).

Side note:
For some reason the demo crashes when I play it in the CS2 demo viewer, but I found it on this stream: https://www.twitch.tv/videos/1960641122?t=11h56m08s

Library version
master @ aa1b925

@markus-wa
Copy link
Owner

Interesting 🤔 - is #450 related?

@micvbang
Copy link
Contributor Author

Just skimmed it -- that seems very likely!

@markus-wa
Copy link
Owner

@micvbang would you be able to check if #477 fixes the issue?

@micvbang
Copy link
Contributor Author

Absolutely, I'm actively sitting and debugging it right now :)

@micvbang
Copy link
Contributor Author

micvbang commented Nov 19, 2023

Hmm.. For the demo I'm currently looking at, this does not seem to help.
For once I've found a demo that I can actually play in the CS2 demoviewer. It's about a month old, so I guess that has to be taken into consideration when using it for debugging.

But: I'm looking at nuke from this match: https://www.hltv.org/matches/2367264/complexity-vs-faze-iem-sydney-2023
Where karrigan in the first 15 seconds buys a flash, a molly, and then another flash.

With your changes I'm only seeing the molly in his inventory. With the changes I'm currently doing myself, I'm only seeing the flash

EDIT: I'm trying to implement the logic outlined in #450

@micvbang
Copy link
Contributor Author

micvbang commented Nov 19, 2023

markus-wa added a commit that referenced this issue Nov 19, 2023
@markus-wa
Copy link
Owner

I've pushed another attempt - can you take another look? still not completely sure though 😓

@markus-wa
Copy link
Owner

but yeah, I think your solution might be more reliable long term

@micvbang
Copy link
Contributor Author

micvbang commented Nov 19, 2023

Yeah - unfortunately that also doesn't work entirely. It looks like him buying the grenades works, but they don't disappear when he throws them :'(

Here's a list of outputs to expect for karrigan in the demo mentioned above:

  • 11 sec: buy flash
  • 11.5 sec: buy molly
  • 12 sec: buy flash
  • 29.5 sec: throw flash
  • 32 sec: throw molly
  • 34 sec: throw flash

In your most recent commit, I can't see that he throws the grenades (i.e. they stay in the inventory)

@micvbang
Copy link
Contributor Author

micvbang commented Nov 19, 2023

Except that I can't figure out how to determine how many flashes a player has (it seems to have changed from the old way of setting additional ammo), my branch seems to handle the above equipment for karrigan correctly. It's by no means correct for all players, but I think it's a step in the right direction

@markus-wa
Copy link
Owner

Ok yeah I think it works - first I thought there was another bug, but I think it looks pretty good indeed, my testing was just bad.

Can you open a PR?

@micvbang
Copy link
Contributor Author

Give it a try now -- it's definitely starting to look like something!

I'll post a PR as well

@markus-wa
Copy link
Owner

fixed in v4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants