I don't think it is necessary to clear the commands. S1x does not do it

This commit is contained in:
FutureRave 2022-03-10 20:16:57 +00:00
parent 9824152c4b
commit c0e19dddfd
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 0 additions and 12 deletions

View File

@ -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);

View File

@ -51,7 +51,6 @@ public:
static void add_sv(const char* name, std::function<void(game::native::gentity_s*, const params_sv&)> callback);
void post_load() override;
void pre_destroy() override;
private:
static utils::memory::allocator allocator_;