mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 07:22:03 +00:00
ReaperThinker: Changed the conditions in the th iterations and moved that i=0 at the start of the loop.
This commit is contained in:
parent
39d24f2319
commit
1bd7959b20
1 changed files with 20 additions and 16 deletions
|
@ -8687,14 +8687,17 @@ void A_ReaperThinker(mobj_t *actor)
|
||||||
|
|
||||||
mo2 = (mobj_t *)th;
|
mo2 = (mobj_t *)th;
|
||||||
|
|
||||||
if (mo2->type == MT_REAPERWAYPOINT && mo2->spawnpoint->angle == 0)
|
if (mo2->type != MT_REAPERWAYPOINT)
|
||||||
{
|
continue;
|
||||||
P_SetTarget(&actor->target, mo2); // The main target we're pursing.
|
if (mo2->spawnpoint->angle != 0)
|
||||||
P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range!
|
continue;
|
||||||
actor->extravalue1 = 0; // This will store the angle of the last waypoint we touched. This will essentially be useful later on.
|
|
||||||
if (!actor->tracer) // If we already have a tracer (Waypoint #0), don't do anything.
|
|
||||||
P_SetTarget(&actor->tracer, mo2); // Because our target might be a player OR a waypoint, we need some sort of fallback option. This will always be waypoint 0.
|
|
||||||
|
|
||||||
|
P_SetTarget(&actor->target, mo2); // The main target we're pursing.
|
||||||
|
P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range!
|
||||||
|
actor->extravalue1 = 0; // This will store the angle of the last waypoint we touched. This will essentially be useful later on.
|
||||||
|
if (!actor->tracer) // If we already have a tracer (Waypoint #0), don't do anything.
|
||||||
|
{
|
||||||
|
P_SetTarget(&actor->tracer, mo2); // Because our target might be a player OR a waypoint, we need some sort of fallback option. This will always be waypoint 0.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8706,8 +8709,7 @@ void A_ReaperThinker(mobj_t *actor)
|
||||||
actor->angle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y);
|
actor->angle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y);
|
||||||
|
|
||||||
// The player we should target if it's near us:
|
// The player we should target if it's near us:
|
||||||
i = 0;
|
for (i=0; i<MAXPLAYERS; i++)
|
||||||
for (; i<MAXPLAYERS; i++)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!playeringame[i])
|
if (!playeringame[i])
|
||||||
|
@ -8751,13 +8753,15 @@ void A_ReaperThinker(mobj_t *actor)
|
||||||
|
|
||||||
mo2 = (mobj_t *)th;
|
mo2 = (mobj_t *)th;
|
||||||
|
|
||||||
if (mo2->type == MT_REAPERWAYPOINT && mo2->spawnpoint->angle == actor->extravalue1+1)
|
if (mo2->type != MT_REAPERWAYPOINT)
|
||||||
{
|
continue;
|
||||||
P_SetTarget(&actor->target, mo2); // The main target we're pursing.
|
if (mo2->spawnpoint->angle != actor->extravalue1+1)
|
||||||
P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range!
|
continue;
|
||||||
actor->extravalue1++; // This will store the angle of the last waypoint we touched. This will essentially be useful later on.
|
|
||||||
|
P_SetTarget(&actor->target, mo2); // The main target we're pursing.
|
||||||
|
P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range!
|
||||||
|
actor->extravalue1++; // This will store the angle of the last waypoint we touched. This will essentially be useful later on.
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue