ThaPwned / WCS

Warcraft: Source using Source.Python to be faster, expandable, and flexible
GNU General Public License v3.0
30 stars 23 forks source link

Exception when player leaves the game #73

Closed NosferatuJoe closed 2 years ago

NosferatuJoe commented 3 years ago

This exception will be thrown when a player leaves the game while standing in a ward. I know this is probably harmless but wanted to log this nevertheless.

[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/helpers/wards.py", line 223, in _tick
    ward.on_disappear()
  File "../addons/source-python/plugins/wcs/core/helpers/wards.py", line 147, in on_disappear
    self.on_exit(wcsplayer)
  File "../addons/source-python/plugins/wcs/core/helpers/wards.py", line 175, in on_exit
    wcsplayer.player.speed += modified
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 751, in player
    return _Player(self.index)
  File "../addons/source-python/packages/source-python/entities/_base.py", line 132, in __call__
    obj = super().__call__(index)
  File "../addons/source-python/packages/source-python/players/_base.py", line 96, in __init__
    PlayerMixin.__init__(self, index)
ValueError: Conversion from "Index" (1) to "BaseEntity" failed.
ThaPwned commented 2 years ago

Should be fixed with 09459af710e20fa4dca5ff4bfd97bbc2ba6cd7a8.