Better handling of clearning scripts.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -61,8 +61,8 @@ namespace CreatureLib::Battling {
|
||||
void Clear() {
|
||||
for (auto s : _scripts) {
|
||||
s->OnRemove();
|
||||
delete s;
|
||||
}
|
||||
_scripts.Clear();
|
||||
_lookup.Clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user