Skip to content

Commit 8502e1b

Browse files
CookStarjordanbriere
authored andcommitted
Fixed Player.is_bot to be cached correctly. (#294)
Fixed Player.is_bot to be cached correctly.
1 parent 45a4060 commit 8502e1b

File tree

1 file changed

+2
-2
lines changed
  • addons/source-python/packages/source-python/players

1 file changed

+2
-2
lines changed

addons/source-python/packages/source-python/players/_base.py

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ def _is_bot(self):
226226
227227
:rtype: bool
228228
"""
229-
return self._is_bot
229+
return self.is_fake_client() or self.steamid == 'BOT'
230230

231231
def is_bot(self):
232232
"""Return whether the player is a bot.
233233
234234
:rtype: bool
235235
"""
236-
return self.is_fake_client() or self.steamid == 'BOT'
236+
return self._is_bot
237237

238238
def is_in_a_vehicle(self):
239239
"""Return whether the player is in a vehicle.

0 commit comments

Comments
 (0)