parent
74bb7bcf0b
commit
89d055a559
37
src/client/component/intro.cpp
Normal file
37
src/client/component/intro.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include <std_include.hpp>
|
||||||
|
#include "loader/component_loader.hpp"
|
||||||
|
#include "game/game.hpp"
|
||||||
|
|
||||||
|
#include <utils/hook.hpp>
|
||||||
|
|
||||||
|
namespace intro
|
||||||
|
{
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
utils::hook::detour cinematic_start_playback_hook;
|
||||||
|
|
||||||
|
void ccc(const char* name, const char* key, const unsigned int playback_flags, const float volume,
|
||||||
|
void* callback_info, const int id)
|
||||||
|
{
|
||||||
|
if (name == "BO3_Global_Logo_LogoSequence"s)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
cinematic_start_playback_hook.invoke(name, key, playback_flags, volume, callback_info, id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class component final : public client_component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void post_unpack() override
|
||||||
|
{
|
||||||
|
cinematic_start_playback_hook.create(game::Cinematic_StartPlayback, ccc);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DEV_BUILD
|
||||||
|
REGISTER_COMPONENT(intro::component)
|
||||||
|
#endif
|
@ -92,6 +92,7 @@ namespace game
|
|||||||
};
|
};
|
||||||
WEAK symbol<unsigned int(scriptInstance_t inst)> Scr_GetNumParam{0x0, 0x140171320};
|
WEAK symbol<unsigned int(scriptInstance_t inst)> Scr_GetNumParam{0x0, 0x140171320};
|
||||||
|
|
||||||
|
WEAK symbol<void(const char* name, const char* key, unsigned int playbackFlags, float volume, void* callbackInfo, int id)> Cinematic_StartPlayback{0x1412BE3A0};
|
||||||
WEAK symbol<void(uint64_t id, bool cancelAll)> Cinematic_StopPlayback{0x1412BEA70};
|
WEAK symbol<void(uint64_t id, bool cancelAll)> Cinematic_StopPlayback{0x1412BEA70};
|
||||||
|
|
||||||
WEAK symbol<bool(void* storageFileInfo)> ShouldTransfer{0x142276E10};
|
WEAK symbol<bool(void* storageFileInfo)> ShouldTransfer{0x142276E10};
|
||||||
|
Loading…
Reference in New Issue
Block a user