demoparser.entities package¶
Submodules¶
demoparser.entities.base module¶
-
class
demoparser.entities.base.BaseEntity(parser, index, class_id, serial, props)[source]¶ Bases:
object-
owner¶ Find entity which owns this entity.
For example, a weapon entity belongs to a player entity. Calling this method on a weapon entity would return a player.
Returns: Owning entity.
-
position¶ Get the position of this entity.
-
server_class¶ Server class to which this entity belongs.
-
team¶ Team to which entity belongs.
Returns: Team entity
-
team_num¶ Entity team number.
Returns: Team number of entity.
-
demoparser.entities.entity_list module¶
demoparser.entities.game_rules module¶
demoparser.entities.player module¶
-
class
demoparser.entities.player.Player(parser, index, class_id, serial, props)[source]¶ Bases:
demoparser.entities.base.BaseEntity-
armor¶ Get armor value.
-
cash¶ Get
-
health¶ Get current health.
-
kills¶ Number of kills for this player.
-
life_state¶ Get life state.
- 0
- Alive.
- 1
- Dying. Either the death animation is still playing or the player is falling and waiting to hit the ground.
- 2
- Dead. Not moving.
Returns: Life state.
-
name¶ Get player’s name.
-
place¶ Get last place player occupied.
A place refers a named navigation mesh. A navigation mesh represents the walkable areas of a map.
Returns: Name of last nav mesh occupied.
-
position¶ Get current position.
Returns: Position vector.
-
steam_id¶ Get Steam ID.
-
view_angle¶ Get current view angle.
Returns: Tuple of pitch and yaw.
-
weapon¶ Get current weapon.
-
demoparser.entities.team module¶
-
class
demoparser.entities.team.Team(parser, index, class_id, serial, props)[source]¶ Bases:
demoparser.entities.base.BaseEntity-
clan¶ Clan name.
-
name¶ Team name. Either ‘T’ or ‘CT’.
-
score¶ Final team score.
-
score_first_half¶ Score for first half of match.
-
score_second_half¶ Score for second half of match.
-