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

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

Open
Xiazee opened this issue Sep 5, 2021 · 3 comments
Open

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

Xiazee opened this issue Sep 5, 2021 · 3 comments

Comments

@Xiazee
Copy link
Contributor

Xiazee commented Sep 5, 2021

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:

  • Get the models defined in the map's .kv file
  • Save each player's model on spawn
  • Somehow get a list of all equipped player agent models (perhaps present when using sv_precacheinfo)
@Xiazee
Copy link
Contributor Author

Xiazee commented Sep 5, 2021

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
Copy link
Contributor

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants