Giter Site home page Giter Site logo

Comments (11)

cato-a avatar cato-a commented on August 27, 2024

Hi, you probably have too few maps left in the rotation. Add one more map to the rotation and you should have 4 maps displayed. You need to have at least 4 unique maps left in the rotation.

from codam_miscmod.

 avatar commented on August 27, 2024

@cato-a
There are 4 unique maps in the rotation

Here it is : gametype dm map zh_king map mp_harbor gametype tdm map suldal_harbor gametype sd map german_town map zh_king

from codam_miscmod.

cato-a avatar cato-a commented on August 27, 2024

Yes you have 4 unique maps, but one map is used for "replay this map", so you only have 3 unique maps left in the rotation.

from codam_miscmod.

 avatar commented on August 27, 2024

I just realized that the two replay choices are the same gametype.

I'm trying to change that and will make a pull request if I succeed.

from codam_miscmod.

cato-a avatar cato-a commented on August 27, 2024

There is no issue here. You need to add 1 more map so that you have enough unique maps in the rotation (4 unique maps in rotation + "replay this map" = 5 unique maps in total). For the rotation to work you need to have a minimum of 5 unique maps.

from codam_miscmod.

 avatar commented on August 27, 2024

For my servers, I want all the possibilities to be displayed in mapvote, so I have 5 in maprotation.

Here is how it looks on the maps that are not the one included twice :

ok
Exactly what I want.

And here is how it looks on the map included twice :

not ok


For me it's a problem that's why I try to modify the behavior.

from codam_miscmod.

cato-a avatar cato-a commented on August 27, 2024

Yes, I understand, but MiscMod support unique maps, not duplicate maps. The bug is rather duplicate maps show up in the vote if the gametype is different. So "replay this map" and "mystery map" will remove any non-unique maps.

So to do what you want you must edit _mm_mapvote.gsc

Find this code and comment it out/delete (line 465/466):

    if(codam\_mm_mmm::in_array(mapRotation, level.mmmapname))
        mapRotation = codam\_mm_mmm::array_remove(mapRotation, level.mmmapname, true);

Replace (from line 502) with something like this:

            case "map":
                if((i + 1) < mapRotation.size
                    && (lastgt != level.mmgametype || mapRotation[i + 1] != level.mmmapname)) {
                    _tmp[_tmp.size]["gametype"] = lastgt;
                    _tmp[_tmp.size - 1]["map"]  = mapRotation[i + 1];
                }

                i += 2;
            break;

Try it out and see if it works.

from codam_miscmod.

 avatar commented on August 27, 2024

I thank you very much for your help, I tried after modifying _mm_mapvote.gsc doing exactly what you wrote.

On the duplicated map (zh_king) DM, here is how it looks now :

current dm

When voted for the SD version, the game goes back to main menu without trying to load the map and displays this error :

dm to sd bomb error

It seems there is no problem after entering /reconnect.


On the duplicated map SD, here is how it looks now :

current sd

When voted for the DM version, the team menu appears (like just arrived on the server), without loading the map.
It seems there is no gameplay problem.


I will try to fix that, if I succeed I will explain here how I done it.
Any info / ideas would be appreciated.

from codam_miscmod.

 avatar commented on August 27, 2024

It looks that StartGameType is not called

from codam_miscmod.

cato-a avatar cato-a commented on August 27, 2024

Different objects are precached in DM and SD gametype, so when it doesn't do a full map reload you get kicked out if those precaches are missing. It seems it doesn't do a full map reload when the rotation goes to same map.

It works from SD to DM because all the objects DM needs are precached in SD.
I guess you could try to precache it always and see if it works. And repeat for every other errors.

precacheModel("xmodel/mp_bomb1_defuse");

At least the code I made for you worked.

from codam_miscmod.

 avatar commented on August 27, 2024

Thank you very much, it works now.

Here is how I done it :
mapvote_replay_othergametype.zip

I will probably create a repository if I make something powerful, such as reading maprotation instead of having to manually detect maps etc

from codam_miscmod.

Related Issues (13)

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.