Raised This Month: $32 Target: $400
 8% 

[L4D] Duplicate Medkit Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Frus
Senior Member
Join Date: Aug 2009
Plugin ID:
1160
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Fixes duplicate medkits in the saferoom
    Old 09-14-2009 , 18:00   [L4D] Duplicate Medkit Fix
    Reply With Quote #1

    Just a quick plugin that fixes the bug in L4D that can cause more than 4 medkits to appear in the saferoom.

    CVARS
    • l4d_dupekitfix_version (1.0) - The version cvar
    • l4d_dupekitfix_enable (1) - Enable/Disable the plugin
    • l4d_dupekitfix_removeonplayer (1) - If 1, removes duplicate medkits directly from the player after being picked up, otherwise if 0 deletes another medkit near the player when a duplicate kit is picked up instead.
    • l4d_dupekitfix_verbose (0) - If 1, it will send a message to the player if the plugin removed the medkit he picked up, telling him he needs to pick up another one.
    • l4d_dupekitfix_debug (0) - If 1, it sends a chat message to all players whenever the plugin removes a medkit. You can use it if you want to verify the plugin is detecting the bug when it occurs.
    Notes
    • I haven't done what I would call extensive testing on it, but I am reasonably confident that the plugin can detect any duplicate medkit in the saferoom and take action on it, from an hour of reloading maps trying to get the bug to trigger, and always being detected. If the plugin doesn't catch an instance of it let me know.
    • Bots freeze up and don't move if I directly remove their kit, therefore it will automatically switch to the delete nearby kit behaviour if it was a bot that picked it up.
    • I don't recommend setting the plugin to use removing kits on the ground behaviour, but it seems to work ok.
    • This is only for servers not running my comp plugin, or disabling the medkit conversion in the plugin. The comp plugin has this feature built in if you are replacing kits in the saferoom with pills.
    • Thanks to Downtown1 for identifying how the bug works.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4ddupekitfix.sp - 3698 views - 4.4 KB)

    Last edited by Frus; 09-14-2009 at 18:34.
    Frus is offline
    egor1908
    Veteran Member
    Join Date: Sep 2009
    Old 09-15-2009 , 07:57   Re: [L4D] Duplicate Medkit Fix
    Reply With Quote #2

    I've met this bug before, but it didn't affect the gameplay at all.
    egor1908 is offline
    Frus
    Senior Member
    Join Date: Aug 2009
    Old 09-15-2009 , 11:16   Re: [L4D] Duplicate Medkit Fix
    Reply With Quote #3

    Quote:
    Originally Posted by egor1908 View Post
    I've met this bug before, but it didn't affect the gameplay at all.
    It usually doesn't, since most teams will not pick up the duplicate kit.

    I coded it for my comp plugin where this bug can actually cause a bug with my plugin on the finale. And it wasn't much effort to change it to kits and make it it's own plugin if somebody wanted it.
    Frus is offline
    madcap
    Senior Member
    Join Date: Feb 2009
    Old 09-15-2009 , 16:50   Re: [L4D] Duplicate Medkit Fix
    Reply With Quote #4

    I thought this only happened if the first team didn't take one of their medpacks. Then, when the 2nd team starts there are 2 medpacks occupying the same spot. Does this happen in other cases?
    madcap is offline
    Frus
    Senior Member
    Join Date: Aug 2009
    Old 09-15-2009 , 22:44   Re: [L4D] Duplicate Medkit Fix
    Reply With Quote #5

    Quote:
    Originally Posted by madcap View Post
    I thought this only happened if the first team didn't take one of their medpacks. Then, when the 2nd team starts there are 2 medpacks occupying the same spot. Does this happen in other cases?
    No, it has nothing to do with that. It's a bug in the weapon pickup code Valve has that can let 2 people pick up the same instance of a weapon.
    Frus is offline
    Zverina
    Senior Member
    Join Date: Aug 2009
    Location: California, USA
    Old 09-16-2009 , 00:03   Re: [L4D] Duplicate Medkit Fix
    Reply With Quote #6

    hah nice bug never heard of this and i've had this game since after the first week it came out xD
    Zverina 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 10:10.


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