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

[L4D2] Improved Prevent M60 Drop


Post New Thread Reply   
 
Thread Tools Display Modes
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-21-2020 , 12:32   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #61

Quote:
Originally Posted by Shao View Post
Okay I'll keep an eye out, sorry for that earlier post.
No worries, new version uploaded...let me know if there are any more issues...
MasterMind420 is offline
Shao
Senior Member
Join Date: Jan 2015
Old 03-22-2020 , 13:23   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #62

So I've found this issue where if you drop/swap the weapon while reloading or when it's empty, it leaves the weapon unable to be picked up again. (I've actually got to find out while trying to pick ammo but got another weapon instead.) For the sake of testing, I've also done it with the Grenade Launcher and it seems that whenever it's empty or not, it can be picked up again, perhaps there would be useful something to take from it.

This really sounds like a complicated problem in the style of how we are currently able to keep the weapon at a 0 ammo count (Which I like btw, it's a nice touch.), knowingly that at 1 bullet it stays pickable and in the inventory otherwise.

Last edited by Shao; 03-22-2020 at 13:27.
Shao is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-22-2020 , 13:57   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #63

Quote:
Originally Posted by Shao View Post
So I've found this issue where if you drop/swap the weapon while reloading or when it's empty, it leaves the weapon unable to be picked up again. (I've actually got to find out while trying to pick ammo but got another weapon instead.) For the sake of testing, I've also done it with the Grenade Launcher and it seems that whenever it's empty or not, it can be picked up again, perhaps there would be useful something to take from it.

This really sounds like a complicated problem in the style of how we are currently able to keep the weapon at a 0 ammo count (Which I like btw, it's a nice touch.), knowingly that at 1 bullet it stays pickable and in the inventory otherwise.
yah i have some ideas to correct the issue...thanks again for reporting.
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-22-2020 , 14:52   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #64

Shao...what plugin are u using to drop the m60? the simplest solution i have for now is to prevent dropping weapons while in the middle of reloading them. if i could detect the drop accurately from the m60 plugin itself i could correct it easily. however the method i use to drop weapons in one of my plugins doesnt detect the drop using sdkhooks. so instead im preventing the drop during reload so it doesnt happen. i can fix it another eay however it would require reworking most of the code in the m60 plugin, which i'd prefer not to do.
MasterMind420 is offline
Shao
Senior Member
Join Date: Jan 2015
Old 03-22-2020 , 15:27   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #65

https://forums.alliedmods.net/showpo...8&postcount=24

I've hotfixed this one years ago, don't remember much of it! But the original has no Deagle or M60 support.

To be honest, as long as it's not being a lost M60 because someone accidentally click a weapon instead of the ammo pile while reloading, it's honestly good! The scenario is rather unlikely to /drop while reloading, but if it's possible to fix, by all means that's pretty awesome.
Shao is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-22-2020 , 15:34   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #66

Quote:
Originally Posted by Shao View Post
https://forums.alliedmods.net/showpo...8&postcount=24

I've hotfixed this one years ago, don't remember much of it! But the original has no Deagle or M60 support.

To be honest, as long as it's not being a lost M60 because someone accidentally click a weapon instead of the ammo pile while reloading, it's honestly good! The scenario is rather unlikely to /drop while reloading, but if it's possible to fix, by all means that's pretty awesome.
yah i'm getting to the bottom of why my plugin doesnt detect the drops using sdkhooks...however the plugin i have uses RELOAD to drop weapons and items when held for about a sec or two...inherently creating more of a problem for me to some degree. I patched the workaround into my plugin for now, until I can get to the bottom of fixing the m60 plugin and making it detect all drops properly...i'll take a look at the plugin u posted and do the same so the issue cant happen for now. Thanks again for finding these issues.

Does that plugin just handle dropping weapons and items? Does it do anything else? Just glancing over the code its definitely old and to be honest drop functionality can be done with ALOT less code...I handle my drops with like 15-20 lines of code tops and it handles everything. I can't release it publicly at this time because its a part of my extra weapons plugin i've been working on and is not ready for release yet. I will patch that plugin though for now.

lol I knew just by looking at the code it was Pans code...

Last edited by MasterMind420; 03-22-2020 at 15:42.
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-22-2020 , 15:46   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #67

Quote:
Originally Posted by Shao View Post
https://forums.alliedmods.net/showpo...8&postcount=24

I've hotfixed this one years ago, don't remember much of it! But the original has no Deagle or M60 support.

To be honest, as long as it's not being a lost M60 because someone accidentally click a weapon instead of the ammo pile while reloading, it's honestly good! The scenario is rather unlikely to /drop while reloading, but if it's possible to fix, by all means that's pretty awesome.
Test this version here...if it works ok you can upload it to the other thread ok. This should prevent drops while reloading a weapon...
Attached Files
File Type: sp Get Plugin or Get Source (l4d_drop.sp - 84 views - 23.0 KB)

Last edited by MasterMind420; 03-22-2020 at 15:47.
MasterMind420 is offline
Shao
Senior Member
Join Date: Jan 2015
Old 03-22-2020 , 16:59   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #68

Not working unfortunately.

I also had to fix a few things while compiling as well. Fixing the tag mismatch with "clip" instead of "dual" also breaks dual pistols as they are dropped by as one rather than two, looking at the code which when dropping duals it does both but then gives a pistol via give cheat, which works in my book so I'll leave it as is.

Edit: Added the newer .sp that can be compiled, it includes your code too.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_drop.sp - 239 views - 22.8 KB)

Last edited by Shao; 03-22-2020 at 17:02. Reason: Forgot to give .sp
Shao is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-22-2020 , 17:20   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #69

Quote:
Originally Posted by Shao View Post
Not working unfortunately.

I also had to fix a few things while compiling as well. Fixing the tag mismatch with "clip" instead of "dual" also breaks dual pistols as they are dropped by as one rather than two, looking at the code which when dropping duals it does both but then gives a pistol via give cheat, which works in my book so I'll leave it as is.

Edit: Added the newer .sp that can be compiled, it includes your code too.
thanks i'm also working on squashing bugs in my weapon fire modes plugin...i'll whip something together that should work, i did it quick but now i see i'm gonna need to do some checking in order to make this work. were there any errors in your sourcemod logs...like m_bInReload entprop not found or anything like that...i did a check to see if it exists but i can see with how quickly i did it i may have missed something. Gotta grab some grub, should be back to it within an hour or so...

Last edited by MasterMind420; 03-22-2020 at 17:21.
MasterMind420 is offline
Shao
Senior Member
Join Date: Jan 2015
Old 03-23-2020 , 00:16   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #70

I didn't get any errors besides the classic tag mismatch, I thought everything would have been fine! I'll test the new plugin soon.
Shao is offline
Reply



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 08:34.


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