Fix ingame cinematics
This commit is contained in:
parent
e7ec73b98f
commit
1bb5773c48
@ -79,6 +79,31 @@ namespace patches
|
|||||||
{
|
{
|
||||||
return game::Dvar_RegisterBool(hash, name, value, game::DVAR_FLAG_SAVED);
|
return game::Dvar_RegisterBool(hash, name, value, game::DVAR_FLAG_SAVED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gscr_cinematic_ingame_loop_resident_stub()
|
||||||
|
{
|
||||||
|
auto arg2 = 1.f;
|
||||||
|
auto arg1 = 1;
|
||||||
|
|
||||||
|
const auto num_params = game::Scr_GetNumParam();
|
||||||
|
if (!num_params)
|
||||||
|
{
|
||||||
|
game::Scr_ErrorInternal();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num_params >= 2)
|
||||||
|
{
|
||||||
|
arg2 = game::Scr_GetFloat(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num_params >= 3)
|
||||||
|
{
|
||||||
|
arg1 = game::Scr_GetInt(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto video = game::Scr_GetString(0);
|
||||||
|
utils::hook::invoke<void>(0x14071B740, video, arg1, arg2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class component final : public component_interface
|
class component final : public component_interface
|
||||||
@ -120,6 +145,9 @@ namespace patches
|
|||||||
|
|
||||||
// make snd_musicDisabledForCustomSoundtrack saved
|
// make snd_musicDisabledForCustomSoundtrack saved
|
||||||
utils::hook::call(0x1405D05FB, register_snd_music_stub);
|
utils::hook::call(0x1405D05FB, register_snd_music_stub);
|
||||||
|
|
||||||
|
// Fix broken function
|
||||||
|
utils::hook::jump(0x140502140, gscr_cinematic_ingame_loop_resident_stub);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user