Raised This Month: $12 Target: $400
 3% 

[L4D2] Weapon Drop Glow Fix [v1.0.3 | 25-December-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7393
Plugin Version:
1.0.3
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    23 
    Plugin Description:
    Fix scavenge gascan glow disappearing when a player dies while holding it
    Old 11-27-2020 , 22:03   [L4D2] Weapon Drop Glow Fix [v1.0.3 | 25-December-2021]
    Reply With Quote #1

    L4D2 ONLY

    Description

    This bug has been reported by HarryPotter.

    Some items like scavenge gascans and cola bottles have a noticeable glow in some game events (scavenge / Whitaker's cola).

    By default, when a survivor picks up an item, the game deactivates the glow of the equipped entity and when you drop it, the glow is restored.

    But, if a survivor instantly dies while holding these items, then it's glow doesn't return, this may also happen if you use the "take a break" option.

    It explains why sometimes I feel that some gascans seem "missing" from the maps.

    This plugin returns the glow every time a holding item is dropped.

    Features
    • Returns the glow to an item when it is dropped.

    Steps to Reproduce
    • Go to some map that has scavenge events (c1m4_atrium/c6m3_port/c14m2_lighthouse) or play a map in scavenge gamemode.
    • Hold a scavenge gascan.
    --------------------------------------------------
    • Die
    OR
    • Use the "take a break".
    • Wait until the bot drops the gascan.
    • Join back.
    --------------------------------------------------
    • Check the gascan glow, it disappeared.

    Cvars

    A configuration file named "l4d2_weapon_drop_glow_fix.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_weapon_drop_glow_fix_enable "1" 
    Admin Commands
    • sm_print_cvars_l4d2_weapon_drop_glow_fix => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • I don't know if there is some side effect on reactivating the glow on pickup, but from my tests, seems safe.
    • This bug is more noticeable on scavenge gascans and cola bottle events, but the fix is applied for all equipable items.
    • This fix also applies to some weapon drop plugins (e.g [L4D2] Weapon Drop) that doesn't return the glow back.

    Thank you!


    Related Plugins

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d2_weapon_drop_glow_fix.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_weapon_drop_glow_fix.sp - 343 views - 9.6 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:18.
    Marttt is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 11-29-2020 , 17:32   Re: [L4D2] Scavenge Gascan Glow Fix [v1.0.0 | 28-November-2020]
    Reply With Quote #2

    Thanks,marttt
    __________________
    HarryPotter is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 12-04-2020 , 07:58   Re: [L4D2] Scavenge Gascan Glow Fix [v1.0.0 | 28-November-2020]
    Reply With Quote #3

    BUG report:
    If I hold a gascan and esc->take a break,
    the gascan would not glow anymore

    Edit:
    1. Take only pistol (no primary weapon)

    2. esc->take a break

    3.gascan no glow
    __________________

    Last edited by HarryPotter; 12-04-2020 at 09:20.
    HarryPotter is offline
    a2121858
    Member
    Join Date: Sep 2020
    Old 12-19-2020 , 00:59   Re: [L4D2] Weapon Drop Glow Fix [v1.0.1 | 17-December-2020]
    Reply With Quote #4

    Thank you, martt
    a2121858 is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 12-20-2020 , 22:21   Re: [L4D2] Weapon Drop Glow Fix [v1.0.1 | 17-December-2020]
    Reply With Quote #5

    Quote:
    Originally Posted by Marttt View Post
    I think I was able to fix the "take a break" bug now.
    It fixed, thanks
    __________________

    Last edited by HarryPotter; 12-20-2020 at 22:21.
    HarryPotter is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 03-08-2021 , 05:37   Re: [L4D2] Weapon Drop Glow Fix [v1.0.1 | 17-December-2020]
    Reply With Quote #6

    error
    PHP Code:
    L 03/07/2021 13:37:27SourceMod error session started
    L 03
    /07/2021 13:37:27Info (map "c2m2_fairgrounds") (file "/root/sv1/left4dead2/addons/sourcemod/logs/errors_20210307.log")
    L 03/07/2021 13:37:27: [SMException reported: Array index out-of-bounds (index -1limit 2049)
    L 03/07/2021 13:37:27: [SMBlamingl4d2_weapon_drop_glow_fix.smx
    L 03
    /07/2021 13:37:27: [SMCall stack trace:
    L 03/07/2021 13:37:27: [SM]   [1Line 170l4d2_weapon_drop_glow_fix.sp::OnWeaponEquip
    L 03
    /07/2021 13:37:27: [SMException reported: Array index out-of-bounds (index -1limit 2049)
    L 03/07/2021 13:37:27: [SMBlamingl4d2_weapon_drop_glow_fix.smx
    L 03
    /07/2021 13:37:27: [SMCall stack trace:
    L 03/07/2021 13:37:27: [SM]   [1Line 180l4d2_weapon_drop_glow_fix.sp::OnWeaponEquipPost
    L 03
    /07/2021 13:54:27Error log file session closed
    __________________
    HarryPotter is offline
    PEK727
    Junior Member
    Join Date: Aug 2020
    Location: United States
    Old 03-21-2021 , 15:01   Re: [L4D2] Weapon Drop Glow Fix [v1.0.2 | 08-March-2021]
    Reply With Quote #7

    Something happens when using this plugin in Versus mode only, well I think anyways it might also happen in Scavenge... survivor glows will occasionally disappear on 1 survivor when viewing them as an infected and only their items have a faint glow. Not sure why but it makes it difficult to see this player without their glow so it gives them an unfair advantage.
    PEK727 is offline
    PEK727
    Junior Member
    Join Date: Aug 2020
    Location: United States
    Old 03-21-2021 , 23:35   Re: [L4D2] Weapon Drop Glow Fix [v1.0.2 | 08-March-2021]
    Reply With Quote #8

    Quote:
    Originally Posted by Marttt View Post
    I didn't understand your reply, can you explain it more clearly?
    Who gets an unfair advantage (survivor or infected)?
    Btw survivor glows can be hidden from infected when a survivor stays quiet (not shooting and moving with SHIFT [walk mode]), this is a game behaviour in any "vs" game mode (not related to the plugin).
    The plugin doesn't check if the survivor is hidden to prevent glow, also only applies glow to items and not survivors.
    The glow around the survivor's character model will be completely hidden for the duration of the chapter, regardless of motion, giving that survivor an advantage of being hard to focus on amongst the chaotic gameplay of Versus.

    Edit: I was incorrect in assuming it was this plugin causing my issue, I apologize and will try to be more certain in the future before I report these "bugs".

    Last edited by PEK727; 03-31-2021 at 19:19. Reason: Resolved my own issue
    PEK727 is offline
    JLmelenchon
    Senior Member
    Join Date: Mar 2019
    Old 08-25-2021 , 11:47   Re: [L4D2] Weapon Drop Glow Fix [v1.0.2 | 08-March-2021]
    Reply With Quote #9

    Is it possible to have a cola bottle/cans version only ? And to hide the glow for infecteds ?
    JLmelenchon is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 12-25-2021 , 21:47   Re: [L4D2] Weapon Drop Glow Fix [v1.0.3 | 25-December-2021]
    Reply With Quote #10

    Plugin updated.

    Code:
    1.0.3 (25-December-2021)
        - Changed WeaponEquipPost to weapon_drop event.
        - Fixed weapons glowing on hands. (thanks "Tonblader" for reporting)
    __________________
    Marttt is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 14:20.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode