Open rakijah opened 5 years ago
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!
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.