コード例 #1
0
def unload():
    # For all users currently multi-leveling
    for userid in currentMultiLevel:
        # Cancel the gamethread
        gamethread.cancelDelayed("%i_multilevel" % userid)

        # Remove bonus effects
        remove_multi_level(userid)

    # Make sure that the listener shuts down
    gravity.deleteGravityList()

    # Kill off our custom attributes
    deleteAttribute("#all", "multiLevels")
    deleteAttribute("#all", "multiLevelEntities")
コード例 #2
0
def unload():
    # For all users currently multi-leveling
    for userid in currentMultiLevel:
        # Cancel the gamethread
        gamethread.cancelDelayed("%i_multilevel" % userid)

        # Remove bonus effects
        remove_multi_level(userid)

    # Make sure that the listener shuts down
    gravity.deleteGravityList()

    # Kill off our custom attributes
    deleteAttribute("#all", "multiLevels")
    deleteAttribute("#all", "multiLevelEntities")
コード例 #3
0
def player_disconnect(event_var):
    # Get event information
    userid = int(event_var['userid'])

    # Remove this player and any of their entities
    if userid in currentMultiLevel:
        # Get rid of their multilevel
        remove_multi_level(userid)

        gravity.removeGravityChange(userid)

        # Cancel the gamethread
        gamethread.cancelDelayed("%i_multilevel" % userid)

    # Players may disconnect before activating, causing an error
    try:
        # Kill off our custom attributes
        deleteAttribute(userid, "multiLevels")
        deleteAttribute(userid, "multiLevelEntities")
    except (ValueError, UseridError):
        return
コード例 #4
0
def player_disconnect(event_var):
    # Get event information
    userid = int(event_var['userid'])

    # Remove this player and any of their entities
    if userid in currentMultiLevel:
        # Get rid of their multilevel
        remove_multi_level(userid)

        gravity.removeGravityChange(userid)

        # Cancel the gamethread
        gamethread.cancelDelayed("%i_multilevel" % userid)

    # Players may disconnect before activating, causing an error
    try:
        # Kill off our custom attributes
        deleteAttribute(userid, "multiLevels")
        deleteAttribute(userid, "multiLevelEntities")
    except (ValueError, UseridError):
        return