Raised This Month: $10 Target: $400
 2% 

[L4D2] Switch Upgrade Ammo Types (1.9) [15-Sep-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
swiftswing1
Member
Join Date: Oct 2020
Old 08-28-2021 , 11:30   Re: [L4D2] Switch Upgrade Ammo Types (1.4) [17-Aug-2021]
Reply With Quote #21

lol sorry i keep complaining about this plugin. it seems to be bugged in survival:
  • when you get upgraded ammo and switch back to normal ammo, you can end up having weird ammo reserve numbers or no ammo in your reserve at all, regardless of primary weapon.
  • it seems intentionally shooting your primary weapon before getting upgraded ammo will solve the issue.
  • receiving normal ammo before grabbing upgraded ammo seems to work as well (through "give ammo" cheat or from ammo pile, but latter needs space in ammo reserve to work anyway). however,
  • i think if you grab another weapon that hasn't been used yet, you'll get the same problem.
  • rarely, i'll find that i can't switch ammo types at all. i'm not sure why it happens and can't replicate it consistently enough to figure it out. i'll try to do some more testing at some point.
for reference: sm10, default cvars, tested on maps: c1m2_streets, c1m4_atrium, helms_deep_r26
Code:
[SM] Listing 20 plugins: 
 01 "Admin File Reader" (1.10.0.6502) by AlliedModders LLC  
 02 "Admin Help" (1.10.0.6502) by AlliedModders LLC  
 03 "Admin Menu" (1.10.0.6502) by AlliedModders LLC  
 04 "Anti-Flood" (1.10.0.6502) by AlliedModders LLC  
 05 "Basic Ban Commands" (1.10.0.6502) by AlliedModders LLC  
 06 "Basic Chat" (1.10.0.6502) by AlliedModders LLC  
 07 "Basic Comm Control" (1.10.0.6502) by AlliedModders LLC  
 08 "Basic Commands" (1.10.0.6502) by AlliedModders LLC  
 09 "Basic Info Triggers" (1.10.0.6502) by AlliedModders LLC  
 10 "Basic Votes" (1.10.0.6502) by AlliedModders LLC
 11 "Client Preferences" (1.10.0.6502) by AlliedModders LLC  
 12 "Fun Commands" (1.10.0.6502) by AlliedModders LLC  
 13 "Fun Votes" (1.10.0.6502) by AlliedModders LLC  
 14 "[L4D & L4D2] Item Giver" (1.4) by Psyk0tik (Crasher_3637)  
 15 "[L4D2] Switch Upgrade Ammo Types" (1.4) by SilverShot  
 16 "[L4D2] Vote Manager" (1.3.5) by McFlurry  
 17 "[L4D/2] Campaign Manager" (1.0.4) by Bigbuck  
 18 "Player Commands" (1.10.0.6502) by AlliedModders LLC  
 19 "Reserved Slots" (1.10.0.6502) by AlliedModders LLC  
 20 "Sound Commands" (1.10.0.6502) by AlliedModders LLC
swiftswing1 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-28-2021 , 21:39   Re: [L4D2] Switch Upgrade Ammo Types (1.4) [17-Aug-2021]
Reply With Quote #22

Quote:
Originally Posted by swiftswing1 View Post
[*]rarely, i'll find that i can't switch ammo types at all. i'm not sure why it happens and can't replicate it consistently enough to figure it out. i'll try to do some more testing at some point.
When you have this issue, is there for example 50 fire bullets loaded and you can't switch to normal ammo or explosive and also cannot reload? I have replicated this when testing on Survival. I noticed reloading the plugin fixes most/all (not sure) of these issues, so it seems to be related to transitioning map or spawning.

I'll look into fixing all this when I can, the code is complicated and I don't have much time to sit through debugging it, but I will do when I can.

On a side note I cannot see why it breaks with Save Weapon plugin.. when detected it uses the same method that plugin does for spawning/giving weapons just slightly more delayed so it should work. I don't think theres anything else I can do to make them compatible.. that plugin uses some poorly coded logic to give weapons on spawn.
__________________
Silvers is offline
swiftswing1
Member
Join Date: Oct 2020
Old 08-29-2021 , 11:17   Re: [L4D2] Switch Upgrade Ammo Types (1.4) [17-Aug-2021]
Reply With Quote #23

Quote:
Originally Posted by Silvers View Post
When you have this issue, is there for example 50 fire bullets loaded and you can't switch to normal ammo or explosive and also cannot reload?
yep, that appears to be the issue exactly: can't reload or switch ammo types until you expend your current upgraded ammo clip, then you reload to your normal ammo but your reserve is empty. your second upgraded ammo clip also disappears.
i can also confirm that reloading the plugin fixes the issues (i believe all of them). though, i had to reload it every time i switched to a different survival map.

additionally:
  • i've found that reloading the Save Weapon plugin also fixes the initial issue i've been having! just once when i load into the server (not on server start it seems) or if it wasn't the last plugin i'd reloaded. i also don't have to reload this plugin after campaign switches or map transitions.
  • i've just realised it might have been able to work this entire time... eep! in any case, i appreciate your time on the fixes. it's not exactly practical to keep manually reloading plugins, but at least i know they work. though, i'm wondering if there's a better way of going about this (at least for the Save Weapon plugin)?
Quote:
Originally Posted by Silvers View Post
I'll look into fixing all this when I can, the code is complicated and I don't have much time to sit through debugging it, but I will do when I can.
understandable - at your own pace! until then, thank you for your continued support and help!
swiftswing1 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-29-2021 , 12:15   Re: [L4D2] Switch Upgrade Ammo Types (1.4) [17-Aug-2021]
Reply With Quote #24

Code:
1.5 (30-Aug-2021)
    - Fixed the plugin breaking in modes other than coop. Thanks to "swiftswing1" for reporting and testing.

Last edited by Silvers; 08-30-2021 at 08:33.
Silvers is offline
swiftswing1
Member
Join Date: Oct 2020
Old 09-11-2021 , 09:01   Re: [L4D2] Switch Upgrade Ammo Types (1.5) [30-Aug-2021]
Reply With Quote #25

Quote:
About:
  • Upgraded ammo is carried over map transitions or restarts (only in coop/realism modes).
hi again - i think the latter feature is bugged, as in if current map is lost, survivors won't respawn back in the saferoom with upgraded ammo (unless restarts means something else). mind taking a look?
swiftswing1 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-11-2021 , 14:23   Re: [L4D2] Switch Upgrade Ammo Types (1.6) [11-Sep-2021]
Reply With Quote #26

Code:
1.6 (11-Sep-2021)
    - Fixed not saving ammo on map transition. Thanks to "swiftswing1" for reporting.
Thanks, strange this used to work. I had to add a one second delay until giving the ammo because the weapon changes from spawn to then. Maybe something in recent game updates has caused this.
__________________
Silvers is offline
swiftswing1
Member
Join Date: Oct 2020
Old 09-11-2021 , 20:09   Re: [L4D2] Switch Upgrade Ammo Types (1.6) [11-Sep-2021]
Reply With Quote #27

Quote:
Originally Posted by Silvers View Post
...
sorry but do you mind checking again please? im still not respawning with the upgraded ammo after map loss :/
swiftswing1 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-11-2021 , 23:27   Re: [L4D2] Switch Upgrade Ammo Types (1.7) [12-Sep-2021]
Reply With Quote #28

Quote:
Originally Posted by swiftswing1 View Post
sorry but do you mind checking again please? im still not respawning with the upgraded ammo after map loss :/
Thank you, I hadn't considered round restart, fixed from my testing.

Code:
1.7 (12-Sep-2021)
    - Fixed not restoring map transitioned ammo on round restart. Thanks to "swiftswing1" for reporting.
__________________
Silvers is offline
in2002
Member
Join Date: Apr 2021
Location: Taiwan
Old 09-12-2021 , 03:52   Re: [L4D2] Switch Upgrade Ammo Types (1.7) [12-Sep-2021]
Reply With Quote #29

add Traditional Chinese (Taiwan)
Attached Files
File Type: txt switch_ammo.phrases.txt (295 Bytes, 16 views)
in2002 is offline
swiftswing1
Member
Join Date: Oct 2020
Old 09-12-2021 , 06:43   Re: [L4D2] Switch Upgrade Ammo Types (1.7) [12-Sep-2021]
Reply With Quote #30

thanks, works great!
if i could please ask for a (hopefully final) request:

i've since found and have been using HarryPotter's version of the save weapon plugin. together with your fix meant for the original, i've had no issues with upgraded ammo not saving after map transtion on my 4+ player coop server (just have to replace the FindConVar value).
as for now, the new issue is that the upgraded ammo doesn't save after round restart from map loss with the save weapon plugin. is there any way to add a fix for this similar to your previous one?
it would be the last issue i have with the plugin, which is too good to pass up anyway, so it's in my server regardless. thanks again.
swiftswing1 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 12:56.


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