moritzuehling/demoinfo-public — pull request #11 by AdamBurgess (2014-12-07 10:09:24+00:00)
Title: Implemented bomb/defuse events.

Implements the following events:
* bomb_beginplant
* bomb_abortplant
* bomb_planted
* bomb_defused
* bomb_exploded
* bomb_begindefuse
* bomb_abortdefuse

also adds a Length property to Vector, and a HasKit property to Player.
I tested the events using a few demos from DHW2014. Everything seemed to work fine, although aborting the defuse never triggered.
It should be - there are definitely references in CPlantedC4's Think method that point to the event being emitted, so I don't know what's happening there.

To find the bomb locations I have to get the player resource entity, find the center of the bombsites, and compare that to the center of the entity that's given via the event. The bomb site index is cached.