Skip to content

Bots don't call OnClientDisconnect on map change #181

@ThaPwned

Description

@ThaPwned

Well, title. But here's some code to see what I'm talking about:

from listeners import OnClientActive
from listeners import OnClientDisconnect

@OnClientActive
def on_client_active(index):
    print('{0} connected'.format(index))

@OnClientDisconnect
def on_client_disconnect(index):
    print('{0} disconnected'.format(index))

Then using bot_add, you get 1 connected. Change the map using changelevel de_dust2 (or any other map name), and you get 1 connected once again but no 1 disconnected.

Here's some info about my setup (from sp info, and bot_index is the code above):

Date          : 2017-01-31 20:46:15.290783
OS            : Windows-8.1-6.3.9600-SP0
Game          : css
SP version    : 549
Server plugins:
   00: Source.Python, (C) 2012-2016, Source.Python Team.
SP plugins:
   00: bot_index

And just because: @Ayuto made me do it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions