Wazarr94 / haxball_bot_headless

Ready-to-go scripts and functions for the HaxBall Headless API !
MIT License
46 stars 74 forks source link

Game time not recording some players #44

Closed advancedgame closed 2 years ago

advancedgame commented 2 years ago

The game log that shows the time played by each player is sometimes not including some players that get subbed in.

i.e. 5 players play in a 4v4 game, 3 played the full game, 1 substitution was made. But it shows as only four players having played.

Wazarr94 commented 2 years ago

This is something I haven't really experienced myself, do you have the recording of a game, that you can share in a zip file, also do you have a screenshot? The only time a player time is "removed" is when they had less than 1 second of playtime.

advancedgame commented 2 years ago

image 19-06-22-21h56-applevscowzz3.zip

Starting lineup for team blue was Ap/ken/porous/cow, aka the lineup in the screenshot. However, Ap started the game AFK and needed to be substituted outside 10 seconds in for nate. Nate played out the rest of the match. However, Ap gets credited with playing the full match and nate is not mentioned in game time at all.

Wazarr94 commented 2 years ago

good catch, I managed to replicate it. will fix asap

Wazarr94 commented 2 years ago

forgot to call the functions that handled the lineup on team change and player leave, fixed