Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit 9bfcb75

Browse files
committed
nSkinz advancedfx-v0.1.23
1 parent 78336b6 commit 9bfcb75

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/Hooks/PostDataUpdate.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,6 @@ void On_FRAME_NET_UPDATE_POSTDATAUPDATE_START(sdk::C_BasePlayer* local)
343343
}
344344
}
345345
}
346+
347+
view_model->ValidateModelIndex();
346348
}

src/Hooks/Sequence.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,12 @@ void hook_viewmodel(sdk::C_BaseViewModel* thisptr)
569569
void MapSequence(sdk::C_BaseViewModel* view_model) {
570570
hook_viewmodel(view_model);
571571

572+
int nSequence = view_model->GetSequence();
573+
int newSequence = nSequence;
574+
auto& entry = g_weapon_to_org[view_model];
575+
int lastSequence = entry.LastSequence;
576+
entry.LastSequence = nSequence;
577+
572578
const auto view_model_weapon = get_entity_from_handle<sdk::C_BaseAttributableItem>(view_model->GetWeapon());
573579
if (view_model_weapon) {
574580
const auto weapon_info = game_data::get_weapon_info(view_model_weapon->GetItemDefinitionIndex());
@@ -580,25 +586,19 @@ void MapSequence(sdk::C_BaseViewModel* view_model) {
580586
if (nullptr != active_conf && 0 != active_conf->definition_override_index) {
581587
auto it = g_weapon_to_orgindex.find(view_model_weapon);
582588
if (it != g_weapon_to_orgindex.end()) {
583-
int newSequence;
584-
int nSequence = view_model->GetSequence();
585-
586-
auto& entry = g_weapon_to_org[view_model];
587-
588-
int lastSequence = entry.LastSequence;
589-
entry.LastSequence = nSequence;
589+
590590
if (lastSequence != nSequence || entry.LastNewSequence == -1)
591591
newSequence = do_sequence_remapping(it->second, nSequence, active_conf->definition_override_index);
592592
else
593593
newSequence = entry.LastNewSequence;
594594

595595
entry.LastNewSequence = newSequence;
596-
view_model->GetSequence() = newSequence;
597596
}
598597
}
599598
}
600599
}
601600
}
601+
view_model->GetSequence() = newSequence;
602602
}
603603

604604
void UnmapSequence(sdk::C_BaseViewModel* view_model) {

src/gui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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.22)");
266+
ImGui::Text("nSkinz by namazso (advancedfx-v0.1.23)");
267267

268268
ImGui::End();
269269
}

0 commit comments

Comments
 (0)