This commit is contained in:
BenCat07 2018-02-08 16:19:37 +01:00 committed by GitHub
parent 942afdb2d1
commit fab204e810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,7 @@ const model_t *point = nullptr;
const model_t *point2 = nullptr;
const model_t *point3 = nullptr;
const model_t *point4 = nullptr;
const model_t *point5 = nullptr;
void AddExploitTicks(int ticks)
{
exticks = std::max(ticks, exticks);
@ -237,7 +238,20 @@ void CreateMove()
model_name))
point4 = model;
}
if (!point2 && !point3 && !point4)
if (!point5)
{
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_trainyard/bomb_cart_red.mdl",
model_name))
point5 = model;
}
if (!point2 && !point3 && !point4 && !point5)
continue;
CachedEntity *pEnt = ENTITY(i);
if (!CE_GOOD(pEnt))
@ -247,7 +261,7 @@ void CreateMove()
const model_t *model = RAW_ENT(pEnt)->GetModel();
if (!model)
continue;
if (model == point2 || model == point3 || model == point4)
if (model == point2 || model == point3 || model == point4 || model == point5)
{
if (!CE_GOOD(LOCAL_E))
continue;
@ -258,9 +272,9 @@ void CreateMove()
const Vector &min1 =
p->OBBMins() + RAW_ENT(LOCAL_E)->GetAbsOrigin();
const Vector &max2 =
c->OBBMaxs() + pEnt->m_vecOrigin + Vector(10, 10, 10);
c->OBBMaxs() + pEnt->m_vecOrigin + Vector(25, 25, 25);
const Vector &min2 =
c->OBBMins() + pEnt->m_vecOrigin - Vector(10, 10, 10);
c->OBBMins() + pEnt->m_vecOrigin - Vector(25, 25, 25);
if ((min1.x <= max2.x && max1.x >= min2.x) &&
(min1.y <= max2.y && max1.y >= min2.y) &&
(min1.z <= max2.z && max1.z >= min2.z))