You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dropped weapons are not removed on Windows due to an exception in on_post_drop_weapon. There are two different exception, caused by the same reason.
[SP] Caught an Exception:
Traceback (most recent call last):
File "..\addons\source-python\plugins\udm\udm.py", line 312, in on_post_drop_weapon
player = make_object(PlayerEntity, stack_data[0])
ValueError: Pointer is NULL.
[SP] Caught an Exception:
Traceback (most recent call last):
File "..\addons\source-python\plugins\udm\udm.py", line 312, in on_post_drop_weapon
player = make_object(PlayerEntity, stack_data[0])
File "..\addons\source-python\packages\source-python\entities\_base.py", line 218, in _obj
return cls(index_from_pointer(ptr))
ValueError: Conversion from "Pointer" (<_memory.Pointer object at 0x1DD8C470>) to "Index" failed.
Fixed by replacing on_post_weapon_drop() with on_pre_weapon_drop()
(EntityPostHook => EntityPreHook on 'drop_weapon')
Signed-off-by: BackRaw <backraw@gmx.de>
Dropped weapons are not removed on Windows due to an exception in
on_post_drop_weapon
. There are two different exception, caused by the same reason.The reason and a workaround for this is described here:
https://forums.sourcepython.com/viewtopic.php?p=7542#p7542
Since you are delaying the removal code anyway, you might want to use a pre-hook.
The text was updated successfully, but these errors were encountered: