I don't think it is necessary to clear the commands. S1x does not do it
This commit is contained in:
parent
9824152c4b
commit
c0e19dddfd
@ -174,15 +174,4 @@ void command::post_load()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void command::pre_destroy()
|
|
||||||
{
|
|
||||||
for (const auto& [key, val] : command::handlers)
|
|
||||||
{
|
|
||||||
game::native::Cmd_RemoveCommand(key.data());
|
|
||||||
handlers.erase(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
command::allocator_.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
REGISTER_MODULE(command);
|
REGISTER_MODULE(command);
|
||||||
|
@ -51,7 +51,6 @@ public:
|
|||||||
static void add_sv(const char* name, std::function<void(game::native::gentity_s*, const params_sv&)> callback);
|
static void add_sv(const char* name, std::function<void(game::native::gentity_s*, const params_sv&)> callback);
|
||||||
|
|
||||||
void post_load() override;
|
void post_load() override;
|
||||||
void pre_destroy() override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static utils::memory::allocator allocator_;
|
static utils::memory::allocator allocator_;
|
||||||
|
Loading…
Reference in New Issue
Block a user