Coder Social home page Coder Social logo

Comments (4)

ouned avatar ouned commented on August 26, 2024

I guess the fix is still working then because there is no "broken" red/blue skin for morgan?
The only problem I'm seeing is that in theory the engine doesn't know how to interpret what g_gametype is (GT_TEAM could be redefined to anything) but that's most likely never happening.

from jk2mv.

 avatar commented on August 26, 2024
typedef enum {
    GT_FFA,             // free for all
    GT_HOLOCRON,        // holocron ffa
    GT_JEDIMASTER,      // jedi master
    GT_TOURNAMENT,      // one on one tournament
    GT_SINGLE_PLAYER,   // single player ffa

    //-- team games go after this --

    GT_TEAM,            // team deathmatch
    GT_SAGA,            // saga
    GT_CTF,             // capture the flag
    GT_CTY,
    GT_MAX_GAME_TYPE
} gametype_t;

So it appears GT_TEAM == 5. Alternatively, include bg_public.h.
Yes, there is no broken red/blue skin for morgan, which is why this cvar should be disabled in team games. (similarly, kyle/fpls2 etc don't work in team games because skin is always forced clientside to red or blue in basejk.)

Oh, and g_gametype should be changed to sv_gametype in my suggestion for it to work.

from jk2mv.

ouned avatar ouned commented on August 26, 2024

yeah, of course, you can just include or define it but it (in a very strict way of thinking) isn't right. A mod could e.g. add another singleplayer gametype and jk2mv then would do weird stuff with it. That will not happen since it didnt the last 12 years but well...

What about removing the team_model checks completely? In case there is no broken team_model and /red /blue is automatically appended this should work, too:?

if (mv_fixbrokenmodels->integer) {
    char model[80];

    Q_strncpyz(model, Info_ValueForKey(cl->userinfo, "model"), sizeof(model));
    if (Q_stristr(model, "kyle/fpls") || (Q_stristr(model, "morgan") && (stricmp(model, "morgan/default_mp") && stricmp(model, "morgan/red") && stricmp(model, "morgan/blue"))))
            Info_SetValueForKey(cl->userinfo, "model", "kyle/default");
}

from jk2mv.

 avatar commented on August 26, 2024

Yeah, good solution.

from jk2mv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.