This repository was archived by the owner on Jan 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,4 @@ void On_FRAME_NET_UPDATE_POSTDATAUPDATE_START(sdk::C_BasePlayer* local)
343343 }
344344 }
345345 }
346-
347- view_model->ValidateModelIndex ();
348346}
Original file line number Diff line number Diff line change @@ -534,6 +534,7 @@ void hook_weapon_update_on_remove(sdk::C_BaseAttributableItem* thisptr);
534534vmt_multi_hook* Get_ViewModel_Hook (sdk::C_BaseViewModel* This);
535535
536536struct OrgModelData_s {
537+ int LastModelIndex = -1 ;
537538 int LastSequence = -1 ;
538539 int LastNewSequence = -1 ;
539540};
@@ -574,6 +575,9 @@ void MapSequence(sdk::C_BaseViewModel* view_model) {
574575 auto & entry = g_weapon_to_org[view_model];
575576 int lastSequence = entry.LastSequence ;
576577 entry.LastSequence = nSequence;
578+ int newModelIndex = view_model->GetModelIndex ();
579+ int lastModelIndex = entry.LastModelIndex ;
580+ entry.LastModelIndex = newModelIndex;
577581
578582 const auto view_model_weapon = get_entity_from_handle<sdk::C_BaseAttributableItem>(view_model->GetWeapon ());
579583 if (view_model_weapon) {
@@ -587,7 +591,7 @@ void MapSequence(sdk::C_BaseViewModel* view_model) {
587591 auto it = g_weapon_to_orgindex.find (view_model_weapon);
588592 if (it != g_weapon_to_orgindex.end ()) {
589593
590- if (lastSequence != nSequence || entry.LastNewSequence == -1 )
594+ if (lastSequence != nSequence || entry.LastNewSequence == -1 || newModelIndex != lastModelIndex )
591595 newSequence = do_sequence_remapping (it->second , nSequence, active_conf->definition_override_index );
592596 else
593597 newSequence = entry.LastNewSequence ;
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ void draw_gui()
263263 ImGui::PopItemWidth ();
264264 ImGui::Columns (1 );
265265
266- ImGui::Text (" nSkinz by namazso (advancedfx-v0.1.23 )" );
266+ ImGui::Text (" nSkinz by namazso (advancedfx-v0.1.24 )" );
267267
268268 ImGui::End ();
269269 }
Original file line number Diff line number Diff line change @@ -102,10 +102,6 @@ auto __fastcall hooks::IBaseClientDLL_FrameStageNotify::hooked(sdk::IBaseClientD
102102 }
103103 }
104104 }
105- m_original (thisptr, nullptr , curStage);
106- } break ;
107- case sdk::FRAME_RENDER_START:
108- {
109105 for (int idx = 0 ; idx <= g_entity_list->GetMaxEntities (); ++idx)
110106 {
111107 if (auto ent = g_entity_list->GetClientEntity (idx))
@@ -121,7 +117,7 @@ auto __fastcall hooks::IBaseClientDLL_FrameStageNotify::hooked(sdk::IBaseClientD
121117 }
122118 m_original (thisptr, nullptr , curStage);
123119 } break ;
124- case sdk::FRAME_RENDER_END :
120+ case sdk::FRAME_NET_UPDATE_START :
125121 {
126122 for (int idx = 0 ; idx <= g_entity_list->GetMaxEntities (); ++idx)
127123 {
You can’t perform that action at this time.
0 commit comments