Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"support flags" for generic mod feature support #140

Open
Razish opened this issue Apr 21, 2013 · 2 comments
Open

"support flags" for generic mod feature support #140

Razish opened this issue Apr 21, 2013 · 2 comments

Comments

@Razish
Copy link
Member

Razish commented Apr 21, 2013

When developing JA++, I ran into several issues of JA+ version sniffing. I ended up faking these version numbers, and developed a [client/server] support flag system, where the client hints what features it supports (/setu csf 0xFFFFFFFF on init) such as large (32 player) scoreboard, K/D scoreboard, fixed weapon animations (missing concussion rifle anims), and other things that would otherwise break base compatibility.

The code looks like this

if ( Server_Supports( SSF_SCOREBOARD_KD ) )
    cg.scores[scoreIndex].deaths        = atoi( CG_Argv( i * scoreOffset + 18 ) );

// or
if ( !Client_Supports( ent, CSF_SCOREBOARD_LARGE ) ) {
    if ( numSorted > MAX_CLIENT_SCORE_SEND )
        numSorted = MAX_CLIENT_SCORE_SEND;
}

Having an open standard for this would be a nice way to offer inter-mod support without version sniffing.
Of course major gameplay changing mods won't need to worry about this, but for lighter server mods that don't require a client modification where people are free to use their own mods (e.g. a JA++ server with JA+, base and Smod clients all able to support these features) this is a rather nice approach in my opinion.

Server sets 'ssf' as serverinfo, client sets 'csf' as userinfo. Both are represented in hex so it only uses a few characters.

@ensiform you mentioned something about my JA+ compatibility changes, was this it =p?

@eezstreet
Copy link
Contributor

Did you fix the first person weapon animations in MP? (chunkiness, also Stouker rifle missing its _barrel animation)?

Sent from my Windows Phone


From: Razishmailto:[email protected]
Sent: ‎4/‎20/‎2013 9:33 PM
To: Razish/OpenJKmailto:[email protected]
Subject: [OpenJK] "support flags" for generic mod feature support (#140)

When developing JA++, I ran into several issues of JA+ version sniffing. I ended up faking these version numbers, and developed a [client/server] support flag system, where the client hints what features it supports (/setu csf 0xFFFFFFFF on init) such as large (32 player) scoreboard, K/D scoreboard, fixed weapon animations (missing concussion rifle anims), and other things that would otherwise break base compatibility.

The code looks like this

if ( Server_Supports( SSF_SCOREBOARD_KD ) )
        cg.scores[scoreIndex].deaths            = atoi( CG_Argv( i * scoreOffset + 18 ) );

// or
if ( !Client_Supports( ent, CSF_SCOREBOARD_LARGE ) ) {
        if ( numSorted > MAX_CLIENT_SCORE_SEND )
                numSorted = MAX_CLIENT_SCORE_SEND;
}

Having an open standard for this would be a nice way to offer inter-mod support without version sniffing.
Of course major gameplay changing mods won't need to worry about this, but for lighter server mods that don't require a client modification where people are free to use their own mods (e.g. a JA++ server with JA+, base and Smod clients all able to support these features) this is a rather nice approach in my opinion.

Server sets 'ssf' as serverinfo, client sets 'csf' as userinfo. Both are represented in hex so it only uses a few characters.

@ensiform you mentioned something about my JA+ compatibility changes, was this it =p?


Reply to this email directly or view it on GitHub:
#140

@Razish
Copy link
Member Author

Razish commented Apr 21, 2013

Yeah, but that's a different issue (entirely client-side)
This is about bg changes that require a client mod to look right (prediction and such)

taysta added a commit to CansecoDev/OpenJK that referenced this issue Mar 16, 2024
* [Shared] Replace CARET shift check when using cl_consoleUseScanCode with a check for cl_consoleShiftRequirement.

The cvar cl_consoleShiftRequirement matches the jk2mv mv_consoleShiftRequirement:
 - 0: no shift key required
 - 1: shift required to open the console
 - 2: shift required to open and close the console

(cherry picked from commit 1479067)

* [Shared] Draw console prompt even when renderer cmd queue overflows from too much text.

mvdevs/jk2mv@634e5b2

(cherry picked from commit ec944bb)

* [Shared] Add con_height cvar to set console height. Set to 0 to restore previous behaviour.

(cherry picked from commit c007dfd)

* render local entities as late as possible (JACoders#1200)

this should defer an overflow of refents occurring that would result in e.g. map models disappearing (light poles on mp/ffa5)
localents are a lower priority, we can afford to miss out on force push/grip effects in these cases

(cherry picked from commit 2d618a5)

* Remove whitespace/comment set but unused variable

---------

Co-authored-by: Daggolin <[email protected]>
Co-authored-by: razor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants