MantisBT - Zandronum
View Issue Details
0002107Zandronum[All Projects] Suggestionpublic2015-02-19 05:492018-09-30 22:22
Dusk 
Dusk 
normalminorN/A
closedfixed 
 
3.03.0 
0002107: PWO rewrite
I rewrote the PWO code a month ago or so due to the dubious quality of the code and due to the unnecessary dependency of the ORDERDEF lump. The new code automatically picks up which weapons are to be subjected to PWO. The ORDERDEF support is removed and any ORDERDEF lumps in wads are silently ignored.

The menu now uses sliders from -10 to 10, where 0 is the default value, putting the PWO default in the middle of the slider. Weapons are grouped per class when possible (see for yourself in Hexen). Configuration is stored in a separate section in the config instead of in CVars.

The code works by picking up weapons from player's weapon slots, due to this it won't see weapon slots defined in KEYCONF (which is deprecated anyway!).
Sandbox branch: pwo
Testing build: 150328-0051
I need this tested because I'm not certain that weapon switching behavior is intact (and in general it could use some testing).

Of note is that it does not pick up AOW weapons at all (due to AOW using KEYCONF). Most of Samsara's weapons are found but are not grouped properly, as Samsara's weapon slots are defined in the weapon classes, thus causing the weapons be slotted for all players. Some are only slotted in KEYCONF again so those are not picked up. I'll need to see if I can circumvent this.
No tags attached.
related to 0002199closed Dusk [MENUDEF] Weapon setup needs to be rebuilt 
Issue History
2015-02-19 05:49DuskNew Issue
2015-02-19 05:49DuskStatusnew => assigned
2015-02-19 05:49DuskAssigned To => Dusk
2015-02-19 06:05DuskDescription Updatedbug_revision_view_page.php?rev_id=6678#r6678
2015-02-19 13:36DuskSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6680#r6680
2015-02-20 16:51DuskStatusassigned => needs testing
2015-02-20 16:51DuskSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6683#r6683
2015-02-20 16:52DuskNote Added: 0011726
2015-02-20 16:53DuskNote Edited: 0011726bug_revision_view_page.php?bugnote_id=11726#r6685
2015-02-20 16:53DuskNote Edited: 0011726bug_revision_view_page.php?bugnote_id=11726#r6686
2015-02-20 17:00DuskAdditional Information Updatedbug_revision_view_page.php?rev_id=6688#r6688
2015-03-28 01:01DuskNote Added: 0011901
2015-03-28 01:02DuskSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6830#r6830
2015-03-28 01:55Ru5tK1ngNote Added: 0011903
2015-04-19 21:53DuskRelationship addedrelated to 0002199
2015-04-19 21:53DuskTarget Version2.1 => 3.0
2015-08-09 11:10Torr SamahoNote Added: 0013145
2015-08-09 11:11Torr SamahoStatusneeds testing => feedback
2015-08-17 20:46DuskNote Added: 0013228
2015-08-17 20:46DuskStatusfeedback => assigned
2015-08-18 11:39cobaltStatusassigned => needs testing
2015-08-18 11:39cobaltDescription Updatedbug_revision_view_page.php?rev_id=7913#r7913
2015-08-18 11:39cobaltSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7914#r7914
2015-08-18 11:39cobaltAdditional Information Updatedbug_revision_view_page.php?rev_id=7915#r7915
2015-08-18 11:39cobaltNote Added: 0013230
2015-08-23 19:08Ru5tK1ngNote Added: 0013256
2015-08-25 10:09DuskNote Added: 0013264
2015-08-25 10:36DuskNote Edited: 0013264bug_revision_view_page.php?bugnote_id=13264#r7943
2015-08-25 10:37DuskStatusneeds testing => needs review
2015-08-25 19:24cobaltStatusneeds review => needs testing
2015-08-25 19:24cobaltNote Added: 0013270
2015-08-27 22:38cobaltNote Added: 0013298
2015-08-29 09:54DuskNote Deleted: 0013298
2015-09-01 16:24DuskStatusneeds testing => resolved
2015-09-01 16:24DuskFixed in Version => 3.0
2015-09-01 16:24DuskResolutionopen => fixed
2018-09-30 22:22Blzut3Statusresolved => closed

Notes
(0011726)
Dusk   
2015-02-20 16:52   
(edited on: 2015-02-20 16:53)
New build 150220-1621:
- the best weapon choosing was fixed so that selection order kicks in when pwo weapons have the same weight
- KEYCONF weapons no longer screw up the weapon listing in the menu
- ccmd pwoinfo added (not much use to the end user though)

I think it's 100% ready for testing now.

(0011901)
Dusk   
2015-03-28 01:01   
New build 150328-0051: should actually save things to ini properly now..
(0011903)
Ru5tK1ng   
2015-03-28 01:55   
I tested out the new build and it saves correctly into the config file. PWO worked for me using vanilla weapons and the option to switch on same weight didn't give me any problems. I loaded up eonweapons and the build picked up the custom weapons without any issue and put them in their correct slots. Weapons with 0 weight were not saved into the cfg until they were changed so that is working correctly. All the PWO weights were saved under the heading: [Doom.PreferredWeaponOrder].
(0013145)
Torr Samaho   
2015-08-09 11:10   
Dusk, can you port this to the new repo and 3.0?
(0013228)
Dusk   
2015-08-17 20:46   
Oh yeah. I'll get to that.
(0013230)
cobalt   
2015-08-18 11:39   
Issue addressed by commit afdacbb: Rewrote support for preferred weapon order, removing the ORDERDEF lump in the process (addresses 2107).
Committed by Teemu Piippo [Dusk] on Tuesday 18 August 2015 03:46:38

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/c_cvars.cpp | 5 +
 src/d_main.cpp | 4 +-
 src/g_shared/a_weapons.cpp | 68 +++----
 src/g_shared/pwo.cpp | 806 +++++++++++++++++++++++++++++++++++-------------------------------------------------------------
 src/g_shared/pwo.h | 135 +++++++++------
 src/gameconfigfile.cpp | 22 ++
 src/gameconfigfile.h | 1 +
 src/menu/menu.h | 9 +-
 src/menu/multiplayermenu.cpp | 53 ++++++
 src/menu/optionmenu.cpp | 11 +-
 src/menu/optionmenuitems.h | 12 +-
 src/p_user.cpp | 25 ++-
 wadsrc/static/menudef.za | 4 +-
 14 files changed, 529 insertions(+), 627 deletions(-)

(0013256)
Ru5tK1ng   
2015-08-23 19:08   
The option to toggle switching on/off same ranked weapons is missing (guessing will come after the menu rebuilding?) but otherwise the PWO works and the data is saved to the ini correctly.

The only other issue seemed when switching between pickup types. If I was using never switch on pickup and changed to PWO, the behavior would be always pickup until I either changed maps or restarted my client.
(0013264)
Dusk   
2015-08-25 10:09   
(edited on: 2015-08-25 10:36)
Whoops. I guess I forgot those out from the menu. I'll fix.

EDIT: Done:'https://bitbucket.org/Torr_Samaho/zandronum/pull-requests/11 [^]'

(0013270)
cobalt   
2015-08-25 19:24   
Issue addressed by commit b7f6157: Re-add two PWO options into the menu.
Committed by Teemu Piippo [Dusk] on Tuesday 25 August 2015 13:21:24

Changes in files:

 src/g_shared/pwo.cpp | 4 +++-
 wadsrc/static/menudef.za | 1 +
 2 files changed, 4 insertions(+), 1 deletions(-)