mirror of
https://github.com/Mestima/GodotHook.git
synced 2025-05-06 16:20:24 +00:00
fixed bug when hook.Call calls a hook more than 1 time
This commit is contained in:
parent
bab2506cc7
commit
805257da76
2
hook.cpp
2
hook.cpp
@ -21,7 +21,6 @@ void Hook::Call(String event, Array args = Array(), bool defer = false) {
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < table.size(); i++) {
|
||||
Dictionary tmp = table.get(event, Dictionary());
|
||||
if (!tmp.is_empty()) {
|
||||
Array keys = tmp.keys();
|
||||
@ -38,7 +37,6 @@ void Hook::Call(String event, Array args = Array(), bool defer = false) {
|
||||
ERR_PRINT("Hook event '" + event + "' cannot be found or empty.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Hook::Remove(String event, String uid) {
|
||||
Dictionary tmp = table.get(event, Dictionary());
|
||||
|
Loading…
x
Reference in New Issue
Block a user