ThaPwned / WCS

Warcraft: Source using Source.Python to be faster, expandable, and flexible
GNU General Public License v3.0
30 stars 23 forks source link

Disguise/mole models do not match the models defined for the map #79

Open Xiazee opened 3 years ago

Xiazee commented 3 years ago

Currently players will always be assigned either a leet/phoenix or gign/gsg9 variant model in csgo. This might give a clear distinction between real players and those who are disguised, if the map uses a different set of models.

For example dust2 is leet vs idf, so a CT player would perhaps be disguised as the proper faction, whereas a T player would always get the wrong faction disguise. (This might also explain #78)

It also does not take into account if all players are using an Agent model.

Possible solutions I can think of:

Xiazee commented 3 years ago

I can also add that the current models being used are the old models. The new ones are found under player/custom_player/legacy/. And there is no perfect naming convention, with _variantA either being the first, second(after the one without a suffix), or skipped.

NosferatuJoe commented 3 years ago

I'm currently using this code and this does seem to work on my server at the moment. It's a temporary fix if someone needs it, this will get rid of the "no arms" issue. What Xiazee proposes would be ideal, especially for the disguiser skill.

Replace the old code with this in wcs/core/helpers/esc/commands.py:

elif GAME_NAME == 'csgo':
    _models[2].extend(
        [
            'tm_leet_varianta',
            'tm_leet_variantb',
            'tm_leet_variantc',
            'tm_leet_variantd',
            'tm_phoenix_varianta',
            'tm_phoenix_variantb',
            'tm_phoenix_variantc',
            'tm_phoenix_variantd'
        ]
    )
    _models[3].extend(
        [
            'custom_player/legacy/ctm_idf',
            'custom_player/legacy/ctm_idf_variantb',
            'custom_player/legacy/ctm_idf_variantc',
            'custom_player/legacy/ctm_idf_variantd',
            'custom_player/legacy/ctm_idf_variante',
            'custom_player/legacy/ctm_idf_variantf'
        ]
    )
ThaPwned commented 2 years ago

The best solution would be to gather all the models in the map's .kv file on map start, as you mentioned Xiazee. Going to have to dig a bit to see if I can come up with a solution. If you already have such a solution, do feel free to do a PR on it, and I'll have a looksy.