add other bomb cart models

This commit is contained in:
BenCat07 2018-02-08 16:05:28 +01:00 committed by GitHub
parent 553d3ecc92
commit 5a811cb42e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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