From 5a811cb42e5f50c049352b6cdff8be19829b4e4d Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Thu, 8 Feb 2018 16:05:28 +0100 Subject: [PATCH] add other bomb cart models --- src/hacks/LagExploit.cpp | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/hacks/LagExploit.cpp b/src/hacks/LagExploit.cpp index 65aa125e..6f2603fc 100644 --- a/src/hacks/LagExploit.cpp +++ b/src/hacks/LagExploit.cpp @@ -36,6 +36,8 @@ CatCommand do_lagexploit("se_do", "Sequence exploit (for use in scripts)", int exticks = 0; const model_t *point = nullptr; const model_t *point2 = nullptr; +const model_t *point3 = nullptr; +const model_t *point4 = nullptr; void AddExploitTicks(int ticks) { exticks = std::max(ticks, exticks); @@ -209,10 +211,33 @@ void CreateMove() if (strstr("models/props_trainyard/bomb_cart.mdl", model_name)) point2 = model; - else - continue; } - if (!point2) + if (!point3) + { + CachedEntity *pEnt = ENTITY(i); + if (!CE_GOOD(pEnt)) + continue; + const model_t *model = RAW_ENT(pEnt)->GetModel(); + if (!model) + continue; + const char *model_name = g_IModelInfo->GetModelName(model); + if (strstr("models/props_2fort/trainwheel001.mdl", + model_name)) + point3 = model; + } + if (!point4) { + CachedEntity *pEnt = ENTITY(i); + if (!CE_GOOD(pEnt)) + continue; + const model_t *model = RAW_ENT(pEnt)->GetModel(); + if (!model) + continue; + const char *model_name = g_IModelInfo->GetModelName(model); + if (strstr("models/custom/dirty_bomb_cart.mdl", + model_name)) + point4 = model; + } + if (!point2 && !point3 && !point4) continue; CachedEntity *pEnt = ENTITY(i); if (!CE_GOOD(pEnt)) @@ -222,7 +247,7 @@ void CreateMove() const model_t *model = RAW_ENT(pEnt)->GetModel(); if (!model) continue; - if (model == point2) + if (model == point2 || model == point3 || model == point4) { if (!CE_GOOD(LOCAL_E)) continue;