void TF2Tools::SDK_OnAllLoaded() { SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools); SM_GET_LATE_IFACE(SDKHOOKS, g_pSDKHooks); SM_GET_LATE_IFACE(SDKTOOLS, g_pSDKTools); if (g_pSDKHooks != NULL) { g_pSDKHooks->AddEntityListener(&g_CritManager); } }
bool TF2Tools::QueryRunning(char *error, size_t maxlength) { SM_CHECK_IFACE(BINTOOLS, g_pBinTools); SM_GET_LATE_IFACE(SDKHOOKS, g_pSDKHooks); return true; }
void CStrike::SDK_OnAllLoaded() { SM_GET_LATE_IFACE(SDKTOOLS, g_pSDKTools); if (g_pSDKTools == NULL) { smutils->LogError(myself, "SDKTools interface not found. TerminateRound native disabled."); } else if (g_pSDKTools->GetInterfaceVersion() < 2) { //<psychonic> THIS ISN'T DA LIMBO STICK. LOW IS BAD smutils->LogError(myself, "SDKTools interface is outdated. TerminateRound native disabled."); } gameevents->AddListener(&g_TimeLeftEvents, "round_start", true); gameevents->AddListener(&g_TimeLeftEvents, "round_end", true); SH_ADD_HOOK(IServerGameDLL, LevelInit, gamedll, SH_MEMBER(&g_TimeLeftEvents, &TimeLeftEvents::LevelInit), true); hooked_everything = true; SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools); }
void SDKTools::SDK_OnAllLoaded() { SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools); if (!g_pBinTools) { return; } g_TEManager.Initialize(); s_TempEntHooks.Initialize(); s_SoundHooks.Initialize(); g_Hooks.Initialize(); InitializeValveGlobals(); }
void EntControl::SDK_OnAllLoaded() { sharesys->AddNatives(myself, natives); sharesys->AddDependency(myself, "sdktools.ext", false, true); SM_GET_LATE_IFACE(SDKTOOLS, g_pSDKTools); if (g_pSDKTools == NULL) { smutils->LogError(myself, "SDKTools interface not found. TerminateRound native disabled."); } else if (g_pSDKTools->GetInterfaceVersion() < 2) { //<psychonic> THIS ISN'T DA LIMBO STICK. LOW IS BAD smutils->LogError(myself, "SDKTools interface is outdated. TerminateRound native disabled."); } HTTP::CreateForwards(); }
void Left4Downtown::SDK_OnAllLoaded() { SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools); SM_GET_LATE_IFACE(SDKTOOLS, g_pSDKTools); if (!g_pBinTools || !g_pSDKTools) { L4D_DEBUG_LOG("Failed to load bintools or failed to load sdktools"); return; } IServer *server = g_pSDKTools->GetIServer(); L4D_DEBUG_LOG("Address of IServer is %p", server); //reading out server->GetName() we consistently seem to get (the same?) //garbage characters. this is possibly causing a crash on windows servers //when a player connects. so lets not read the server name :( //L4D_DEBUG_LOG("Server name is %s", server->GetName()); g_pServer = server; InitializeValveGlobals(); g_AddonsEclipse.InstallChangeCallback(::OnAddonsEclipseChanged); AddonsDisabler::AddonsEclipse = g_AddonsEclipse.GetInt(); #ifdef USE_PLAYERSLOTS_PATCHES /* allow more than 8 players in l4d if l4d_maxplayers is not -1 also if +maxplayers or -maxplayers is not the default value (8) */ g_MaxPlayers.InstallChangeCallback(::OnMaxPlayersChanged); /* read the +-maxplayers from command line */ /*commenting out the code below seems to not make it crash during connection to my NFO START HERE */ ICommandLine *cmdLine = CommandLine_Tier0(); int maxplayers = -1; L4D_DEBUG_LOG("Command line is: %s", cmdLine->GetCmdLine()); maxplayers = cmdLine->ParmValue("+maxplayers", -1); L4D_DEBUG_LOG("Command line +maxplayers is: %d", maxplayers); if(maxplayers == -1) { maxplayers = cmdLine->ParmValue("-maxplayers", -1); } /* end here */ PlayerSlots::MaxPlayers = maxplayers; #endif /* detour the witch/spawn spawns */ //automatically will unregister/cleanup themselves when the ext is unloaded g_PatchManager.Register(new AutoPatch<Detours::SpawnSpecial>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnTank>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnWitch>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnWitchBride>()); g_PatchManager.Register(new AutoPatch<Detours::ClearTeamScores>()); g_PatchManager.Register(new AutoPatch<Detours::SetCampaignScores>()); g_PatchManager.Register(new AutoPatch<Detours::FirstSurvivorLeftSafeArea>()); g_PatchManager.Register(new AutoPatch<Detours::GetScriptValueInt>()); g_PatchManager.Register(new AutoPatch<Detours::GetScriptValueFloat>()); g_PatchManager.Register(new AutoPatch<Detours::GetScriptValueString>()); g_PatchManager.Register(new AutoPatch<Detours::TryOfferingTankBot>()); g_PatchManager.Register(new AutoPatch<Detours::MobRushStart>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnITMob>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnMob>()); g_PatchManager.Register(new AutoPatch<Detours::ShovedBySurvivor>()); g_PatchManager.Register(new AutoPatch<Detours::GetCrouchTopSpeed>()); g_PatchManager.Register(new AutoPatch<Detours::GetRunTopSpeed>()); g_PatchManager.Register(new AutoPatch<Detours::GetWalkTopSpeed>()); g_PatchManager.Register(new AutoPatch<Detours::HasConfigurableDifficulty>()); g_PatchManager.Register(new AutoPatch<Detours::GetSurvivorSet>()); g_PatchManager.Register(new AutoPatch<Detours::FastGetSurvivorSet>()); g_PatchManager.Register(new AutoPatch<Detours::GetMissionVersusBossSpawning>()); g_PatchManager.Register(new AutoPatch<Detours::CThrowActivate>()); g_PatchManager.Register(new AutoPatch<Detours::StartMeleeSwing>()); g_PatchManager.Register(new AutoPatch<Detours::UseHealingItems>()); g_PatchManager.Register(new AutoPatch<Detours::FindScavengeItem>()); g_PatchManager.Register(new AutoPatch<Detours::SendInRescueVehicle>()); g_PatchManager.Register(new AutoPatch<Detours::ChangeFinaleStage>()); g_PatchManager.Register(new AutoPatch<Detours::EndVersusModeRound>()); g_PatchManager.Register(new AutoPatch<Detours::SelectWeightedSequence>());//for SelectTankAttack g_PatchManager.Register(new AutoPatch<Detours::Revived>()); g_PatchManager.Register(new AutoPatch<Detours::WaterMove>()); g_PatchManager.Register(new AutoPatch<Detours::PlayerStagger>()); g_PatchManager.Register(new AutoPatch<Detours::TerrorWeaponHit>()); g_PatchManager.Register(new AutoPatch<Detours::CTerrorGameRules>()); g_PatchManager.Register(new AutoPatch<Detours::CBaseServer>()); //new style detours that create/destroy the forwards themselves g_PatchManager.Register(new AutoPatch<Detours::IsFinale>()); g_PatchManager.Register(new AutoPatch<Detours::OnEnterGhostState>()); #ifdef USE_PLAYERSLOTS_PATCHES g_PatchManager.Register(new AutoPatch<Detours::ServerPlayerCounts>()); #endif }
void L4D2Tools::SDK_OnAllLoaded() { SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools); SM_GET_LATE_IFACE(SDKTOOLS, g_pSDKTools); if (!g_pBinTools || !g_pSDKTools) { L4D_DEBUG_LOG("Failed to load bintools or failed to load sdktools"); return; } IServer *server = g_pSDKTools->GetIServer(); L4D_DEBUG_LOG("Address of IServer is %p", server); //reading out server->GetName() we consistently seem to get (the same?) //garbage characters. this is possibly causing a crash on windows servers //when a player connects. so lets not read the server name :( //L4D_DEBUG_LOG("Server name is %s", server->GetName()); g_pServer = server; InitializeValveGlobals(); /* detour the witch/spawn spawns */ //automatically will unregister/cleanup themselves when the ext is unloaded g_PatchManager.Register(new AutoPatch<Detours::SpawnSpecial>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnTank>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnWitch>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnWitchBride>()); g_PatchManager.Register(new AutoPatch<Detours::FirstSurvivorLeftSafeArea>()); g_PatchManager.Register(new AutoPatch<Detours::GetScriptValueInt>()); g_PatchManager.Register(new AutoPatch<Detours::GetScriptValueFloat>()); g_PatchManager.Register(new AutoPatch<Detours::GetScriptValueString>()); g_PatchManager.Register(new AutoPatch<Detours::TryOfferingTankBot>()); g_PatchManager.Register(new AutoPatch<Detours::MobRushStart>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnITMob>()); g_PatchManager.Register(new AutoPatch<Detours::SpawnMob>()); g_PatchManager.Register(new AutoPatch<Detours::GetCrouchTopSpeed>()); g_PatchManager.Register(new AutoPatch<Detours::GetRunTopSpeed>()); g_PatchManager.Register(new AutoPatch<Detours::GetWalkTopSpeed>()); g_PatchManager.Register(new AutoPatch<Detours::HasConfigurableDifficulty>()); g_PatchManager.Register(new AutoPatch<Detours::CThrowActivate>()); g_PatchManager.Register(new AutoPatch<Detours::StartMeleeSwing>()); g_PatchManager.Register(new AutoPatch<Detours::SendInRescueVehicle>()); g_PatchManager.Register(new AutoPatch<Detours::ChangeFinaleStage>()); g_PatchManager.Register(new AutoPatch<Detours::SelectSequence>());//for SelectTankAttack g_PatchManager.Register(new AutoPatch<Detours::Revived>()); g_PatchManager.Register(new AutoPatch<Detours::PlayerStagger>()); g_PatchManager.Register(new AutoPatch<Detours::HealBegin>()); g_PatchManager.Register(new AutoPatch<Detours::UseHealingItems>()); g_PatchManager.Register(new AutoPatch<Detours::FindScavengeItem>()); g_PatchManager.Register(new AutoPatch<Detours::WitchAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::WitchKillIncapVictim>()); g_PatchManager.Register(new AutoPatch<Detours::WitchRetreat>()); g_PatchManager.Register(new AutoPatch<Detours::InfectedAlertUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::InfectedAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::SmokerAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::BoomerAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::HunterAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::SpitterAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::JockeyAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::ChargerAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::TankAttackUpdate>()); g_PatchManager.Register(new AutoPatch<Detours::SurvivorUseObjectUpdate>()); //new style detours that create/destroy the forwards themselves g_PatchManager.Register(new AutoPatch<Detours::OnEnterGhostState>()); }
void TF2Tools::SDK_OnAllLoaded() { SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools); }