AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2]M60_GrenadeLauncher_patches[28/02/2023] (https://forums.alliedmods.net/showthread.php?t=323408)

Lux 04-19-2020 02:57

[L4D2]M60_GrenadeLauncher_patches[28/02/2023]
 
3 Attachment(s)
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

Dragokas 04-22-2020 13:38

Re: [L4D2]M60_GrenadeLauncher_patches
 
Thanks for releasing, such opportunity looks very nice!

cravenge 04-24-2020 05:05

Re: [L4D2]M60_GrenadeLauncher_patches
 
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.

Lux 04-24-2020 06:25

Re: [L4D2]M60_GrenadeLauncher_patches
 
Quote:

Originally Posted by cravenge (Post 2695840)
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.

MasterMind420 04-24-2020 08:53

Re: [L4D2]M60_GrenadeLauncher_patches
 
Quote:

Originally Posted by cravenge (Post 2695840)
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.

Shao 05-04-2020 04:08

Re: [L4D2]M60_GrenadeLauncher_patches
 
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.

Lux 05-04-2020 04:41

Re: [L4D2]M60_GrenadeLauncher_patches
 
Quote:

Originally Posted by Shao (Post 2698026)
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 (Post 2694504)
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.

Tonblader 06-12-2020 14:08

Re: [L4D2]M60_GrenadeLauncher_patches
 
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

Lux 06-12-2020 17:59

Re: [L4D2]M60_GrenadeLauncher_patches
 
Quote:

Originally Posted by Tonblader (Post 2705319)
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

Spicy Hot Pot 09-11-2020 08:45

Re: [L4D2]M60_GrenadeLauncher_patches
 
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:bee:


All times are GMT -4. The time now is 04:44.

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