diff --git a/mission/functions/core/teams/fn_force_team_change.sqf b/mission/functions/core/teams/fn_force_team_change.sqf index 5f905a50..7de9dfd5 100644 --- a/mission/functions/core/teams/fn_force_team_change.sqf +++ b/mission/functions/core/teams/fn_force_team_change.sqf @@ -36,6 +36,8 @@ publicVariable _team; [[_team], { [] call vn_mf_fnc_task_refresh_tasks_client; [] call vn_mf_fnc_tr_overview_team_update; + // apply new team's traits to player + [] call vn_mf_fnc_apply_unit_traits; + // resets the duty officer wheel menus on the client + [] call vn_mf_fnc_action_trait; }] remoteExec ["spawn", _player]; - -[] remoteExecCall ["vn_mf_fnc_apply_unit_traits", _player]; diff --git a/mission/functions/systems/traits/fn_action_trait.sqf b/mission/functions/systems/traits/fn_action_trait.sqf index 65e81443..2f1ac067 100644 --- a/mission/functions/systems/traits/fn_action_trait.sqf +++ b/mission/functions/systems/traits/fn_action_trait.sqf @@ -26,9 +26,14 @@ private _airSupport = ["enable_air_support", 1] call BIS_fnc_getParamValue; private _artySupport = ["enable_arty_support", 1] call BIS_fnc_getParamValue; { private _agent = _x; + + // reset any existing client-side wheel menu options + // to only show currently available roles to a player + _agent setVariable ["para_wheel_menu_dyn_actions", []]; + { - private _traitConfig = _x; - private _trait = configName _traitConfig; + private _traitConfig = _x; + private _trait = configName _traitConfig; private _traitName = getText(_traitConfig >> "text"); private _image = getText(_traitConfig >> "image"); if !(_trait == "vn_artillery" && (_airSupport == 0 && _artySupport == 0)) then { diff --git a/mission/functions/systems/traits/fn_settrait.sqf b/mission/functions/systems/traits/fn_settrait.sqf index dc0e4ad7..dcf56ff9 100644 --- a/mission/functions/systems/traits/fn_settrait.sqf +++ b/mission/functions/systems/traits/fn_settrait.sqf @@ -108,4 +108,7 @@ if !(vn_mf_duty_officers inAreaArray [getPos _player, 20, 20, 0, false, 20] isEq }; [_trait,_allowed] call BIS_fnc_log; + + // reset the duty officer wheel menu on the client + [] remoteExecCall ["vn_mf_fnc_action_trait",_player]; }; diff --git a/mission/para_player_init_client.sqf b/mission/para_player_init_client.sqf index cbf2c506..21cdd460 100644 --- a/mission/para_player_init_client.sqf +++ b/mission/para_player_init_client.sqf @@ -92,9 +92,6 @@ progressLoadingScreen 1.0; //Setup teleporters call vn_mf_fnc_action_teleport; -call vn_mf_fnc_apply_unit_traits; - -call vn_mf_fnc_action_trait; [parseText format["%1",localize "STR_vn_mf_loading10"]] call vn_mf_fnc_update_loading_screen; // apply health effects