create fx component

This commit is contained in:
quaK 2024-07-03 13:13:49 +03:00
parent 6088963fbd
commit b795ad3a75
2 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1,22 @@
#include <std_include.hpp>
#include "loader/component_loader.hpp"
#include "game/game.hpp"
#include <utils/hook.hpp>
namespace fx
{
class component final : public component_interface
{
public:
void post_unpack() override
{
// skip "fx/" and "vfx/" name prefix checks
utils::hook::set<uint8_t>(0xB34889_b, 0xEB); // Scr_LoadFx
utils::hook::nop(0xD0FBFD_b, 2); // ParticleSystem_Register
}
};
}
REGISTER_COMPONENT(fx::component)

View File

@ -312,9 +312,6 @@ namespace patches
utils::hook::set<uint8_t>(0xC5A200_b, 0xC3);
utils::hook::set(0x6D5280_b, 0xC301B0); // NetConstStrings_IsPrecacheAllowed
// skip "fx/" and "vfx/" name prefix checks (move this to map_patches)
utils::hook::set<uint8_t>(0xB34889_b, 0xEB); // Scr_LoadFx
}
};
}