mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-21 23:18:05 -05:00
priorities production ready (not tested)
This commit is contained in:
parent
673317d3cb
commit
6db3084062
1 changed files with 5 additions and 5 deletions
|
@ -161,7 +161,7 @@ namespace geode::modifier {
|
|||
if (!res) {
|
||||
return Err(std::move(res).unwrapErr());
|
||||
}
|
||||
res.unwrap()->setPriority(priority);
|
||||
std::move(res).unwrap()->setPriority(priority);
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
@ -200,8 +200,8 @@ namespace geode::modifier {
|
|||
for (auto modHook : hooks) {
|
||||
if (modHook->getAddress() != hook->getAddress()) continue;
|
||||
auto priority = hook->getPriority();
|
||||
if (priority < mod->getPriority()) {
|
||||
hook->setPriority(mod->getPriority() + 1);
|
||||
if (priority < modHook->getPriority()) {
|
||||
hook->setPriority(modHook->getPriority() + 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -234,8 +234,8 @@ namespace geode::modifier {
|
|||
for (auto modHook : hooks) {
|
||||
if (modHook->getAddress() != hook->getAddress()) continue;
|
||||
auto priority = hook->getPriority();
|
||||
if (priority > mod->getPriority()) {
|
||||
hook->setPriority(mod->getPriority() - 1);
|
||||
if (priority > modHook->getPriority()) {
|
||||
hook->setPriority(modHook->getPriority() - 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue