Skip to content

Player/WeaponMixin MRO issues #287

@CookStar

Description

@CookStar

make_object(Player, pointer) no longer works after b580da2

# Source.Python
#   Weapons
from weapons.restrictions import weapon_restriction_handler
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/packages/source-python/weapons/restrictions.py", line 389, in _on_weapon_bump
    make_object(Player, args[0]), edict_from_pointer(args[1]).classname)
  File "../addons/source-python/packages/source-python/weapons/restrictions.py", line 68, in on_player_bumping_weapon
    value = handler.on_player_bumping_weapon(player, weapon_name)
  File "../addons/source-python/packages/source-python/weapons/restrictions.py", line 291, in on_player_bumping_weapon
    return not self.is_player_restricted(player, weapon)
  File "../addons/source-python/packages/source-python/weapons/restrictions.py", line 313, in is_player_restricted
    if weapon_name in self.player_restrictions[player.userid]:

AttributeError: 'PlayerMixin' object has no attribute 'userid'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions