Author
|
Message
|
Member
Join Date: Aug 2010
Location: middle-universe
|
02-17-2024
, 13:34
[L4D2] Fix Saferoom door +USE bug
|
#1
|
InfoSometimes, if there are several players standing in front of a safe room door, or if weapons/medkits are scattered around, pressing "E" might not work or might interact with items instead, even if you are right in front of it, which can be incredibly frustrating. This plugin fixes the issue, making doors work as intended. It should theoretically be compatible with most door-related plugins. There is a native for unscramblers or lockers if you need to allow operation only after a certain event.
CVARSl4d2_fix_safedoor_use_distance_to_open [100] - You will be able to OPEN doors from this distance
l4d2_fix_safedoor_use_distance_to_close [115] - You will be able to CLOSE doors from this distance
l4d2_fix_safedoor_use_wait_permission_from_ot her_plugin [0] - In case you use unscrambler or door locker, wait for it (to use native) Nativesnative void FixSafedoorUseEnable(true/false=enable/disable); Short video TechThe plugin places and saves three points on each door: left, center, and right. It monitors their coordinates when the door's position changes. If the player presses "E" near these points, it uses trace ray to ensure the player is looking at the door. In case of player_use triggered by the engine, some decisions are taken in the next frame to avoid conflicts with other plugins. Then, AcceptInput is used for opening/closing and sends a player_use event for other plugins. If the door has DOOR_FLAG_IGNORE_USE enabled, or if last door has DOOR_FLAG_STARTS_LOCKED like c10m3 church, it also won't work. Changelog
Code:
1.1/1.2 - fixed wrong door entity errors and added l4d2_fix_safedoor_use_debug cvar
1.3 - fixed c10m3 church door; added native param "value" true/false to enable/disable for last door gameplay ideas, which is true by default if not specified
Last edited by glhf3000; 03-18-2024 at 10:44.
|
|
|
|