Skip to content

Commit

Permalink
fixed crashes (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasak authored Aug 18, 2024
1 parent 9833b73 commit bf69b40
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions source/episodiccontent.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,6 @@ public:
injector::MakeNOP(pattern.get_first(7), 2, true);
}

pattern = hook::pattern("83 3D ? ? ? ? ? F3 0F 10 0D ? ? ? ? F3 0F 11 4C 24 ? 75 14"); // APC_EXPLOSION
if (!pattern.empty())
injector::MakeNOP(pattern.get_first(21), 2, true);
else {
pattern = hook::pattern("83 3D ? ? ? ? ? F3 0F 10 05 ? ? ? ? F3 0F 11 44 24 ? 75 4C");
injector::MakeNOP(pattern.get_first(21), 2, true);
}

pattern = hook::pattern("83 3D ? ? ? ? ? 0F 85 ? ? ? ? 8B 3D ? ? ? ? F3 0F 11 4C 24"); // GRENADE_EXPLOSION
if (!pattern.empty())
injector::MakeNOP(pattern.get_first(7), 6, true);
Expand Down Expand Up @@ -369,15 +361,15 @@ public:
if (!pattern.empty())
injector::MakeNOP(pattern.get_first(7), 6, true);
else {
pattern = hook::pattern("83 3D ?? ?? ?? ?? ?? 0F 85 ?? ?? ?? ?? 56 8B 74 24 0C");
pattern = hook::pattern("83 3D ? ? ? ? ? 0F 85 ? ? ? ? 8B 54 24 0C");
injector::MakeNOP(pattern.get_first(7), 6, true);
}

pattern = hook::pattern("83 3D ? ? ? ? ? 0F 57 C9"); // parachute wind sounds
if (!pattern.empty())
injector::MakeNOP(pattern.get_first(10), 2, true);
else {
pattern = hook::pattern("83 3D ?? ?? ?? ?? ?? 75 0A F3 0F 10 05 ?? ?? ?? ?? EB 03");
pattern = hook::pattern("83 3D ? ? ? ? ? 75 0A F3 0F 10 05 ? ? ? ? EB 03");
injector::MakeNOP(pattern.get_first(7), 2, true);
}

Expand Down Expand Up @@ -484,7 +476,7 @@ public:
injector::MakeNOP(pattern.get_first(3), 2, true);
else {
pattern = hook::pattern("88 8C 24 ? ? ? ? 75 2F");
injector::MakeNOP(pattern.get_first(8), 6, true);
injector::MakeNOP(pattern.get_first(7), 2, true);
}

pattern = hook::pattern("B8 ? ? ? ? 0F 44 E8 57"); // E2_landing marker
Expand Down

0 comments on commit bf69b40

Please sign in to comment.