AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Weapon Drop Glow Fix [v1.0.3 | 25-December-2021] (https://forums.alliedmods.net/showthread.php?t=328841)

Marttt 11-27-2020 22:03

[L4D2] Weapon Drop Glow Fix [v1.0.3 | 25-December-2021]
 
8 Attachment(s)
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.


HarryPotter 11-29-2020 17:32

Re: [L4D2] Scavenge Gascan Glow Fix [v1.0.0 | 28-November-2020]
 
Thanks,marttt

HarryPotter 12-04-2020 07:58

Re: [L4D2] Scavenge Gascan Glow Fix [v1.0.0 | 28-November-2020]
 
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

a2121858 12-19-2020 00:59

Re: [L4D2] Weapon Drop Glow Fix [v1.0.1 | 17-December-2020]
 
Thank you, martt:)

HarryPotter 12-20-2020 22:21

Re: [L4D2] Weapon Drop Glow Fix [v1.0.1 | 17-December-2020]
 
Quote:

Originally Posted by Marttt (Post 2729073)
I think I was able to fix the "take a break" bug now.

It fixed, thanks

HarryPotter 03-08-2021 05:37

Re: [L4D2] Weapon Drop Glow Fix [v1.0.1 | 17-December-2020]
 
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


PEK727 03-21-2021 15:01

Re: [L4D2] Weapon Drop Glow Fix [v1.0.2 | 08-March-2021]
 
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 03-21-2021 23:35

Re: [L4D2] Weapon Drop Glow Fix [v1.0.2 | 08-March-2021]
 
Quote:

Originally Posted by Marttt (Post 2741211)
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".

JLmelenchon 08-25-2021 11:47

Re: [L4D2] Weapon Drop Glow Fix [v1.0.2 | 08-March-2021]
 
Is it possible to have a cola bottle/cans version only ? And to hide the glow for infecteds ?

Marttt 12-25-2021 21:47

Re: [L4D2] Weapon Drop Glow Fix [v1.0.3 | 25-December-2021]
 
Plugin updated.

Code:

1.0.3 (25-December-2021)
    - Changed WeaponEquipPost to weapon_drop event.
    - Fixed weapons glowing on hands. (thanks "Tonblader" for reporting)



All times are GMT -4. The time now is 11:45.

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