diff --git a/source/Main.cpp b/source/Main.cpp index 812d55f7..6f48f00b 100644 --- a/source/Main.cpp +++ b/source/Main.cpp @@ -120,50 +120,7 @@ struct CallbackUnbinder { ~CallbackUnbinder() { - _Clbk->OnServerInitialise = nullptr; - _Clbk->OnServerShutdown = nullptr; - _Clbk->OnServerFrame = nullptr; - _Clbk->OnPluginCommand = nullptr; - _Clbk->OnIncomingConnection = nullptr; - _Clbk->OnClientScriptData = nullptr; - _Clbk->OnPlayerConnect = nullptr; - _Clbk->OnPlayerDisconnect = nullptr; - _Clbk->OnPlayerRequestClass = nullptr; - _Clbk->OnPlayerRequestSpawn = nullptr; - _Clbk->OnPlayerSpawn = nullptr; - _Clbk->OnPlayerDeath = nullptr; - _Clbk->OnPlayerUpdate = nullptr; - _Clbk->OnPlayerRequestEnterVehicle = nullptr; - _Clbk->OnPlayerEnterVehicle = nullptr; - _Clbk->OnPlayerExitVehicle = nullptr; - _Clbk->OnPlayerNameChange = nullptr; - _Clbk->OnPlayerStateChange = nullptr; - _Clbk->OnPlayerActionChange = nullptr; - _Clbk->OnPlayerOnFireChange = nullptr; - _Clbk->OnPlayerCrouchChange = nullptr; - _Clbk->OnPlayerGameKeysChange = nullptr; - _Clbk->OnPlayerBeginTyping = nullptr; - _Clbk->OnPlayerEndTyping = nullptr; - _Clbk->OnPlayerAwayChange = nullptr; - _Clbk->OnPlayerMessage = nullptr; - _Clbk->OnPlayerCommand = nullptr; - _Clbk->OnPlayerPrivateMessage = nullptr; - _Clbk->OnPlayerKeyBindDown = nullptr; - _Clbk->OnPlayerKeyBindUp = nullptr; - _Clbk->OnPlayerSpectate = nullptr; - _Clbk->OnPlayerCrashReport = nullptr; - _Clbk->OnVehicleUpdate = nullptr; - _Clbk->OnVehicleExplode = nullptr; - _Clbk->OnVehicleRespawn = nullptr; - _Clbk->OnObjectShot = nullptr; - _Clbk->OnObjectTouched = nullptr; - _Clbk->OnPickupPickAttempt = nullptr; - _Clbk->OnPickupPicked = nullptr; - _Clbk->OnPickupRespawn = nullptr; - _Clbk->OnCheckpointEntered = nullptr; - _Clbk->OnCheckpointExited = nullptr; - _Clbk->OnEntityPoolChange = nullptr; - _Clbk->OnServerPerformanceReport = nullptr; + memset(_Clbk, 0, sizeof(PluginCallbacks)); } };