| 460 | } |
| 461 | |
| 462 | void SourceModBase::CloseSourceMod() |
| 463 | { |
| 464 | if (!sSourceModInitialized) |
| 465 | return; |
| 466 | |
| 467 | SH_REMOVE_HOOK(IServerGameDLL, LevelInit, gamedll, SH_MEMBER(this, &SourceModBase::LevelInit), false); |
| 468 | SH_REMOVE_HOOK(IVEngineServer, GetMapEntitiesString, engine, SH_MEMBER(this, &SourceModBase::GetMapEntitiesString), false); |
| 469 | |
| 470 | if (g_Loaded) |
| 471 | { |
| 472 | /* Force a level end */ |
| 473 | LevelShutdown(); |
| 474 | ShutdownServices(); |
| 475 | } |
| 476 | |
| 477 | /* Rest In Peace */ |
| 478 | sCoreProviderImpl.ShutdownBridge(); |
| 479 | |
| 480 | g_pPawnEnv = NULL; |
| 481 | } |
| 482 | |
| 483 | void SourceModBase::ShutdownServices() |
| 484 | { |