Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Exception thrown for game event "inferno_expire" #155

Open
rakijah opened this issue Dec 19, 2018 · 1 comment
Open

Exception thrown for game event "inferno_expire" #155

rakijah opened this issue Dec 19, 2018 · 1 comment

Comments

@rakijah
Copy link

rakijah commented Dec 19, 2018

I'm getting an exception when parsing a particular demo in GameEventHandler line 247 because the entityID is not found in the dictionary:

fireEndArgs.ThrownBy = parser.InfernoOwners[entityID];

The exception occurs on tick 66 during warmup.

My guess: a molotov was thrown by a bot before the demo recording started. Then, while the molotov was burning, the bot got replaced by a player and demo recording started. Then the molotov stopped burning but the owners ID was never recorded in the demo.

Sounds like a rare edge case that would be solved via a simple parser.InfernoOwners.ContainsKey(entityID) check, but I don't know enough about your code base to confidently submit that as a pull request.

@main--
Copy link
Contributor

main-- commented Dec 21, 2018

Your explanation makes sense, this is one of the (multiple) problems that arise from the fact that molotovs are networked this way. The fix you describe looks correct to me, keeping the ThrownBy as null whenever we can't figure out the owner. Feel free to submit the pull request!

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

No branches or pull requests

2 participants