Skip to content

Releases: markus-wa/demoinfocs-golang

v1.4.0

09 Oct 18:02
e06d053
Compare
Choose a tag to compare

New Features / Changes

  • Partial support for POV demos (#2)
  • Implemented fmt.Stringer interface for Player & Equipment

v1.3.3

20 Sep 09:46
6f36fec
Compare
Choose a tag to compare

Fixes

  • Fixed Player fields in some events sometimes being nil at the start of the demo
    Affected events:
    • Kill
    • WeaponFire
    • PlayerFootstep

v1.3.2

19 Sep 23:06
88ba5b8
Compare
Choose a tag to compare

Fixes

  • Added Equipment.AmmoInMaganzine2() & Equipment.AmmoReserve2(), which fix grenade ammo values (#145 - thanks @Linus4)
  • Fixed Player.Weapons()[...].Owner sometimes being nil
  • Fixed edge case where ItemEquip.Player was nil if a player disconnected and was replaced by a bot (#142 - thanks @BestAwperEver)
  • Fixed some events not containing correct references to weapons (#148 & #149)
    This happened if the weapon was an alternative/replacement (e.g. USP instead of P2000 or silenced M4 variant)
  • Fixed MP5-SD being recognized as MP7
  • Fixed spelling error in EqDualBerettas.String() (was Barettas instead of Berettas)

v1.3.1

24 Aug 08:41
d47a55d
Compare
Choose a tag to compare

Fixes

  • Added missing Equipment + mapping for the MP5-SD, common.EqMP5 (#138 - thanks @BestAwperEver)
  • Fixed Entity.Destroy() not being called in some cases (#139)

v1.3.0

17 Aug 16:23
Compare
Choose a tag to compare

Deprecation Notices

  • ItemPickup.Weapon has been deprecated, use ItemPickup.WeaponTraceable() instead.
  • ItemEquip.Weapon has been deprecated, use ItemEquip.WeaponPtr instead.
  • ItemDrop.Weapon has been deprecated, use ItemDrop.WeaponPtr instead.
  • RankUpdate.SteamID has been deprecated, use RankUpdate.SteamID32 instead.

New Features / Changes

  • Added GameState.ConVars() which returns a map[string]string of CVar key-value pairs (#97)
  • Added events.ConVarsUpdated which signals that CVars have been changed (#97)
  • Added events.WeaponReload which signals that a player is reloading his weapon (#137)
  • Added Inferno.Owner() which returns the player that threw the fire grenade (#131)
  • Added GameState.GamePhase() which returns the current GamePhase (#136)
  • Added common.EquipmentElementNames() which returns a map[EquipmentElement]string containing weapon names (#135)
  • Added common.GamePhaseNames() which returns a map[GamePhase]string containing the names of the GamePhases (#135)
  • GenericGameEvent will now always be dispatched, regardless of whether there is a custom, corresponding event in the events package or not

Fixes

  • Fixed weapon-ID not being consistent for ItemPickup, ItemEquip & ItemDrop (#119)
  • Fixed Equipment.AmmoReserve never being updated (#133)
  • Delayed dispatching of FireGrenadeStart to the end of the tick so EntityID is useful (#131)
  • Documented that RankUpdate.SteamID contains the 32-bit SteamID (#128)

Contributors

Thanks to @xXxhaxmeister42xXx for the various contributions to this release.

v1.2.1

08 Jul 18:52
Compare
Choose a tag to compare

Deprecation Notices

  • Player.CashSpentThisRound() has been deprecated, use Player.AdditionalPlayerInformation.CashSpentThisRound instead.
  • Player.CashSpentTotal() has been deprecated, use Player.AdditionalPlayerInformation.TotalCashSpent instead.

Fixes

  • Fixed Player.CashSpentThisRound() & Player.CashSpentTotal()

v1.2.0

04 Jul 19:56
Compare
Choose a tag to compare

Deprecation Notices

  • Entity.FindProperty() has been deprecated, use Entity.FindPropertyI() instead which returns IProperty instead of *Property
  • Entity.Properties() has been deprecated, use Entity.PropertiesI() instead which returns []IProperty instead of []Property
  • TickDone has been deprecated, use FrameDone instead (#120)

New Features / Changes

  • Added PlayerSpottersChanged event (#114)
  • Added helper functions to common.Player (#114):
    • IsSpottedBy(*Player) bool
    • HasSpotted(*Player) bool
  • Added helper functions to Participants (#114):
    • SpottersOf(*Player) []*Player
    • SpottedBy(*Player) []*Player
  • Added helper functions to common.Player for easily retrieving additional data (#115):
    • Player.IsInBombZone()
    • Player.IsInBuyZone()
    • Player.IsWalking()
    • Player.IsScoped()
    • Player.CashSpentThisRound()
    • Player.CashSpentTotal()
  • Added helper functions to common.TeamState for retrieving information over all members of a team:
    • TeamState.Members()
    • TeamState.CurrentEquipmentValue()
    • TeamState.RoundStartEquipmentValue()
    • TeamState.FreezeTimeEndEquipmentValue()
    • TeamState.CashSpentThisRound()
    • TeamState.CashSpentTotal()
  • Updated protobuf descriptions (allows parsing of new data)

Fixes

  • Added missing events.RankUpdate parsing and dispatching (#112 - thanks @allenymin)
  • Fixed EquipmentElement.String() returning M4A1 for EqM4A4 (#124 - thanks @xavier-rodet)

v1.1.1

08 Apr 14:16
Compare
Choose a tag to compare

New Features / Changes

Fixes

  • Fixed devision by 0 in DemoHeader.FrameTime() if Header.PlaybackFrames is zero (#108 - thanks @marksamman)

v1.1.0

30 Mar 12:37
8f7845c
Compare
Choose a tag to compare

New Features / Changes

  • Added Player.FlashDurationTimeRemaining() utility function - returns the remaining duration of the flash as of the current tick
  • Added Participants.Connected() function, returns all currently connected players & spectators
  • Changed Participants.All() to return all currently known players of the demo, including disconnected ones
  • Improved Participants godoc (#100)
  • Improved performance (~ 5-10%)

Fixes

  • Updated outdated information in metadata package (#103 - thanks @o40)
  • Fixed Player.IsBlinded() false positives (#96)
  • Fixed Participants returning kicked bots (and possibly disconnected players) in some cases (#98)
  • Fixed Player=nil for some events after player disconnected (#69)
  • Fixed Player.IsBot false negatives
  • Fixed potential memory leak in Parser.ParseNextFrame()
  • Fixed Participants.ByEntityID() becoming outdated in some cases

v1.0.1

28 Feb 19:52
Compare
Choose a tag to compare

New Features / Changes

  • Added Player.TeamState field as shortcut / utility (#89)

Fixes

  • Fixed TeamState.Opponent containing the wrong reference and therefore never being updated (#90)
  • Fixed EOF panicing, changed to returning ErrUnexpectedEndOfDemo (#93 - thanks @micvbang)