Add main pipeline
This commit is contained in:
parent
f909521cfb
commit
11d6098c69
@ -184,7 +184,7 @@ namespace command
|
||||
|
||||
enum_assets(type, [type](const game::XAssetHeader header)
|
||||
{
|
||||
const auto asset = game::XAsset{ type, header };
|
||||
const auto asset = game::XAsset{type, header};
|
||||
const auto* const asset_name = game::DB_GetXAssetName(&asset);
|
||||
//const auto entry = game::DB_FindXAssetEntry(type, asset_name);
|
||||
//TODO: display which zone the asset is from
|
||||
|
@ -85,6 +85,7 @@ namespace scheduler
|
||||
task_pipeline pipelines[pipeline::count];
|
||||
utils::hook::detour r_end_frame_hook;
|
||||
utils::hook::detour g_run_frame_hook;
|
||||
utils::hook::detour main_frame_hook;
|
||||
|
||||
void execute(const pipeline type)
|
||||
{
|
||||
@ -103,6 +104,12 @@ namespace scheduler
|
||||
g_run_frame_hook.invoke<void>();
|
||||
execute(pipeline::server);
|
||||
}
|
||||
|
||||
void main_frame_stub()
|
||||
{
|
||||
main_frame_hook.invoke<void>();
|
||||
execute(pipeline::main);
|
||||
}
|
||||
}
|
||||
|
||||
void schedule(const std::function<bool()>& callback, const pipeline type,
|
||||
@ -154,6 +161,7 @@ namespace scheduler
|
||||
|
||||
r_end_frame_hook.create(game::base_address + 0x76D7B0, scheduler::r_end_frame_stub);
|
||||
g_run_frame_hook.create(game::base_address + 0x4CB030, scheduler::server_frame_stub);
|
||||
main_frame_hook.create(game::base_address + 0x417FA0, scheduler::main_frame_stub);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -24,8 +24,6 @@ namespace scripting
|
||||
|
||||
utils::hook::detour scr_add_class_field_hook;
|
||||
|
||||
std::unordered_map<std::string, int> known_events;
|
||||
|
||||
void vm_notify_stub(const unsigned int notify_list_owner_id, const game::scr_string_t string_value,
|
||||
game::VariableValue* top)
|
||||
{
|
||||
@ -41,13 +39,6 @@ namespace scripting
|
||||
e.arguments.emplace_back(*value);
|
||||
}
|
||||
|
||||
if (known_events.find(e.name) == known_events.end())
|
||||
{
|
||||
//printf("notify: %s\n", e.name.data());
|
||||
|
||||
known_events[e.name] = 1;
|
||||
}
|
||||
|
||||
lua::engine::notify(e);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user