MantisBT - Zandronum
View Issue Details
0002082Zandronum[All Projects] Bugpublic2015-01-25 11:182018-09-30 21:38
Zalewa 
Dusk 
normalminoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
 
2.12.1 
0002082: .deh files are not reported by the server if they're loaded with -deh.
To load a .deh file you need to use '-deh' argument. However, the .deh file loaded in such way is not reported by the server, so the server browser don't know that it needs to load it too when launching the client. .deh file is reported properly when loaded with '-file', but in such case its contents aren't really loaded by the game at all.
No tags attached.
related to 0002081closed Zalewa Doomseeker .deh/.bex files may need to be loaded with different cmd line args depending on game 
Issue History
2015-01-25 11:18ZalewaNew Issue
2015-01-25 11:21ZalewaRelationship addedrelated to 0002081
2015-03-29 19:08DuskTarget Version => 2.1
2015-03-30 13:54DuskAssigned To => Dusk
2015-03-30 13:54DuskStatusnew => assigned
2015-03-30 15:09DuskNote Added: 0011937
2015-03-30 15:11DuskStatusassigned => needs review
2015-03-30 16:05ZalewaNote Added: 0011938
2015-04-03 15:16Torr SamahoNote Added: 0012005
2015-04-03 15:16Torr SamahoStatusneeds review => feedback
2015-04-03 15:21Torr SamahoNote Edited: 0012005bug_revision_view_page.php?bugnote_id=12005#r6899
2015-04-03 18:53DuskNote Added: 0012009
2015-04-03 18:53DuskStatusfeedback => assigned
2015-04-03 18:55DuskNote Edited: 0012009bug_revision_view_page.php?bugnote_id=12009#r6903
2015-04-25 16:35DuskNote Added: 0012170
2015-04-25 16:35DuskStatusassigned => needs review
2015-05-24 11:12cobaltStatusneeds review => needs testing
2015-05-24 11:12cobaltNote Added: 0012353
2015-06-24 22:46DuskStatusneeds testing => resolved
2015-06-24 22:46DuskFixed in Version => 2.2
2015-06-24 22:46DuskResolutionopen => fixed
2015-06-24 22:47DuskFixed in Version2.2 => 2.1
2018-09-30 21:38Blzut3Statusresolved => closed

Notes
(0011937)
Dusk   
2015-03-30 15:09   
Added a new query flag to get the deh patches.
(0011938)
Zalewa   
2015-03-30 16:05   
Awesome.
(0012005)
Torr Samaho   
2015-04-03 15:16   
(edited on: 2015-04-03 15:21)
Looks fine. Just two minor comments:

- Any particular reason why you implemented the same thing for SQF_OPTIONAL_WADS and SQF_DEH quite differently, i.e.

    // [TP] Optional wads
    if ( ulFlags & SQF_OPTIONAL_WADS )
    {
        int numIndices = NETWORK_ReadByte( pByteStream );

        while ( numIndices-- )
            NETWORK_ReadByte( pByteStream );
    }

vs.

    // [TP] Dehacked patches
    if ( ulFlags & SQF_DEH )
    {
        for ( int i = NETWORK_ReadByte( pByteStream ); i > 0; --i )
            NETWORK_ReadString( pByteStream );
    }

? Both code snippets are perfectly fine, it's just a little strange to see the very same thing being implemented differently, even though the code snippets are right after each other in the source and were implemented by the same person ;).

- SQF_OPTIONAL_WADS has

    // [TP] Don't send optional wads if there isn't any.
    if ( g_OptionalWadIndices.Size() == 0 )
        ulBits &= ~SQF_OPTIONAL_WADS;

SQF_DEH doesn't do this. Wouldn't it be nicer to have the two things behave consistently?

EDIT: Tiny thing: The history entry has "-" and "+" switched, but I can easily correct this locally.

(0012009)
Dusk   
2015-04-03 18:53   
(edited on: 2015-04-03 18:55)
Quote
Any particular reason why you implemented the same thing for SQF_OPTIONAL_WADS and SQF_DEH quite differently

Because somebody said I'm not supposed to change unrelated code in patches. :p
TBH I didn't even notice this.

Quote
SQF_OPTIONAL_WADS has <code> SQF_DEH doesn't do this. Wouldn't it be nicer to have the two things behave consistently?

That's a minor oversight indeed. I'll fix this.

(0012170)
Dusk   
2015-04-25 16:35   
'https://bitbucket.org/Torr_Samaho/zandronum-stable/pull-request/134 [^]'
(0012353)
cobalt   
2015-05-24 11:12   
Issue addressed by commit b2846a443687: - added query flag SQF_DEH to allow server browsers to query any dehacked patches loaded by the server (addresses 2082)
Committed by Teemu Piippo [Dusk] on Saturday 25 April 2015 19:08:05

Changes in files:
 docs/zandronum-history.txt | 1 +
 src/browser.cpp | 11 ++++++++---
 src/d_dehacked.cpp | 19 ++++++++++++++++++-
 src/d_dehacked.h | 3 +++
 src/sv_main.h | 3 ++-
 src/sv_master.cpp | 15 +++++++++++++++
 6 files changed, 47 insertions(+), 5 deletions(-)