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

[L4D2]M60_GrenadeLauncher_patches[28/02/2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Plugin ID:
7051
Plugin Version:
1.0.9
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows M60 and Grenade Launcher to function as any other weapon. Not dropping on empty and picking up ammo to refill
    Old 04-19-2020 , 02:57   [L4D2]M60_GrenadeLauncher_patches[28/02/2023]
    Reply With Quote #1

    simple memory patch to Allow M60 and Grenade Launcher to function as any other weapon. Not dropping on empty and picking up ammo to refill

    Thanks silvers & mastermind for testing.
    Thank xZk for 0 clip drop issue.
    Should avoid alot of conflicts.

    Code:
    I don't think "!drop" plugins work that use SDKHooks_Drop function, looks to not fire my hook my guess is sourcemod ignore it, like SDKHooks_TakeDamage with a Damage hook, could likely solve this with using dhooks.
    Code:
    Update: 1.0.9 m60 plugin
    Added crude fix for m60 droping and not being accounted for.
    Example to set reserve ammo amounts when picking up ammo piles and director spawned weapons.
    PHP Code:
    sm_cvar ammo_m60_max 450
    sm_cvar ammo_grenadelauncher_max 25 

    Repo Use to live here
    Attached Files
    File Type: sp Get Plugin or Get Source (GrenadeLauncher_AmmoPile_patch.sp - 4668 views - 2.9 KB)
    File Type: txt M60_GrenadeLauncher_patches.txt (1.1 KB, 2410 views)
    File Type: sp Get Plugin or Get Source (M60_NoDrop_AmmoPile_patch.sp - 1384 views - 6.0 KB)
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 02-28-2023 at 08:32. Reason: Add example for reserve ammo.
    Lux is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 04-22-2020 , 13:38   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #2

    Thanks for releasing, such opportunity looks very nice!
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    cravenge
    Veteran Member
    Join Date: Nov 2015
    Location: Chocolate Factory
    Old 04-24-2020 , 05:05   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #3

    Is it still necessary to have a timer that checks the M60's ammo every frame even after the patches are applied? I'm talking about the counter bugging out when it's refilled.

    Last edited by cravenge; 04-24-2020 at 05:08.
    cravenge is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 04-24-2020 , 06:25   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #4

    Quote:
    Originally Posted by cravenge View Post
    Is it still necessary to have a timer that checks the M60's ammo every frame even after the patches are applied? I'm talking about the counter bugging out when it's refilled.
    Did not know there was a bug with refilling unless that was because of working around refilling in older methods?

    In anycase default ammo refill logic now applies to m60 unless there is a bug with ammo refilling with all guns then ill have to say no.

    Note: m_iClip Prop_Send is uint8, so max clip size that client can display is 255.
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 04-24-2020 at 06:26.
    Lux is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 04-24-2020 , 08:53   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #5

    Quote:
    Originally Posted by cravenge View Post
    Is it still necessary to have a timer that checks the M60's ammo every frame even after the patches are applied? I'm talking about the counter bugging out when it's refilled.
    No the problem is solved with this patch...reloading clips works as normal.
    MasterMind420 is offline
    Shao
    Senior Member
    Join Date: Jan 2015
    Old 05-04-2020 , 04:08   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #6

    Amazing plugin, I wasn't able to find any flaws aside a certain situation the !drop plugin that I use.

    Goes as this: Drop the secondary and every items but the primary empty M60, then drop the primary empty M60 turning into civilian mode where it would be impossible to pick up again.

    Otherwise, dropping the M60 empty from picking weapons would allow it to be picked up and using !drop as long as it had ammo it would not cause any problems. After all that scenario is really specific to occur, I doubt it needs to be fixed but could be looked into.
    Shao is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 05-04-2020 , 04:41   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #7

    Quote:
    Originally Posted by Shao View Post
    Amazing plugin, I wasn't able to find any flaws aside a certain situation the !drop plugin that I use.

    Goes as this: Drop the secondary and every items but the primary empty M60, then drop the primary empty M60 turning into civilian mode where it would be impossible to pick up again.

    Otherwise, dropping the M60 empty from picking weapons would allow it to be picked up and using !drop as long as it had ammo it would not cause any problems. After all that scenario is really specific to occur, I doubt it needs to be fixed but could be looked into.
    Quote:
    Originally Posted by Lux View Post
    Code:
    I don't think "!drop" plugins work that use SDKHooks_Drop function, looks to not fire my hook my guess is sourcemod ignore it, like SDKHooks_TakeDamage with a Damage hook, could likely solve this with using dhooks.
    This covered in gameplay that would happen, since SDKHooks_Drop does not register dropping nothing i can do other than dhook, maybe ill look in to using dhooks but this seems to be sourcemod ignore so on the fence about it.
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Tonblader
    Senior Member
    Join Date: Jul 2011
    Location: Peru
    Old 06-12-2020 , 14:08   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #8

    It would be good to add cvar's to activate or deactivate these functions:

    1. 1 bullet without being able to fire so that you can select from your inventory the grenade launcher and the m60 so that it can be thrown to the ground with command !drop
    sm_cvar sm_bulletfrozen 1/0

    2. rechargeable or non-rechargeable ammunition for that specific weapon
    sm_cvar sm_refillm60 1/0
    sm_cvar sm_refillgl 1/0
    Tonblader is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 06-12-2020 , 17:59   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #9

    Quote:
    Originally Posted by Tonblader View Post
    It would be good to add cvar's to activate or deactivate these functions:

    1. 1 bullet without being able to fire so that you can select from your inventory the grenade launcher and the m60 so that it can be thrown to the ground with command !drop
    sm_cvar sm_bulletfrozen 1/0

    2. rechargeable or non-rechargeable ammunition for that specific weapon
    sm_cvar sm_refillm60 1/0
    sm_cvar sm_refillgl 1/0
    No

    The whole point of the plugins is to just make it function like any other weapon if you want something specific use Plugin/Gameplay Ideas and Requests
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Spicy Hot Pot
    New Member
    Join Date: Sep 2020
    Old 09-11-2020 , 08:45   Re: [L4D2]M60_GrenadeLauncher_patches
    Reply With Quote #10

    Can you fix the bug that once the M60's clip has been fully fired(reached to 0) and drop it/ changed to another weapon,we can't pick it up again
    Spicy Hot Pot 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 06:24.


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