MantisBT - Zandronum
View Issue Details
0001827Zandronum[All Projects] Suggestionpublic2014-06-09 18:162014-06-15 16:49
JKist3 
 
normalminorhave not tried
acknowledgedopen 
 
 
0001827: PWO switch upon running out of ammo
What weapon will zandronum automatically switch you to after you run out of ammo with the one you currently have out? This is actually an important question. It seems to have a hard coded order that it goes through at the moment, but it would be good if this could be custom set by the player if they wanted to.

Here is one proposed solution to this:

In upcoming versions of zandronum, a PWO upgrade has been made giving the option for weapons of equal priority to not switch to each other upon pickup. This could be extended with a PWO switch threshold variable (or constant) where if turned on, a weapon's priority number needs to be greater than the threshold + the current weapon's priority level to switch upon pickup. However, after running out of ammo the absolute highest value weapon in your pwo is chosen to switch to.

Example:

Rocket priority: .22
SSG priority: .49
Plasma priority: .31
BFG priority: .48

PWO switch threshold: 0.1 (a weapon has to be greater than .1 difference between the current weapon to switch)
______________


I have Rockets out. Next i pickup BFG. (BFG priority)-(Rocket priority) = .26 which is greater than .1 so I get switched to BFG. Next i pickup plasma. (plasma priority)-(BFG priority) = -.17 which is not greater than .1 so no switch is made. Next I pickup SSG. (SSG priority)-(BFG priority) = .01 which is not greater than .1 so no switch is made. I fire BFG until empty. SSG is then switched to because it's the weapon with the highest level of priority that I have ammo for.

Hope this made sense.
No tags attached.
Issue History
2014-06-09 18:16JKist3New Issue
2014-06-09 19:44AlienOverlordNote Added: 0008973
2014-06-09 19:45AlienOverlordNote Edited: 0008973bug_revision_view_page.php?bugnote_id=8973#r4875
2014-06-09 20:51JKist3Note Added: 0008975
2014-06-09 21:00WatermelonNote Added: 0008976
2014-06-15 16:49WatermelonStatusnew => acknowledged

Notes
(0008973)
AlienOverlord   
2014-06-09 19:44   
(edited on: 2014-06-09 19:45)
Looks like a lot of trouble for the programmer and confusion for the users...

(0008975)
JKist3   
2014-06-09 20:51   
My suggestion was mostly because I thought this would be easy for a coder to implement. Defining a secondary PWO strictly for switching weapons upon empty may be less confusing for everyone.
(0008976)
Watermelon   
2014-06-09 21:00   
Yeah I hated when I'd use the BFG, get stuck with 20 cells and it'd switch to the plasma. That cost me games.