Always shift entities, even if inactive.
This commit is contained in:
parent
44818d295a
commit
6409e4ec11
|
@ -7,10 +7,33 @@
|
||||||
"requires" : "PREVIOUS",
|
"requires" : "PREVIOUS",
|
||||||
"objectives" : [
|
"objectives" : [
|
||||||
{
|
{
|
||||||
"description" : "Check all Wayponts",
|
"description" : "Check all Waypoints",
|
||||||
"targetName" : "Waypoint",
|
"targetName" : "Waypoint",
|
||||||
"targetValue" : 5,
|
"targetValue" : 5,
|
||||||
"targetType" : "TT_WAYPOINT"
|
"targetType" : "TT_WAYPOINT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description" : "Destroy Pandoran fighters",
|
||||||
|
"targetName" : "Pandoran",
|
||||||
|
"targetValue" : 3,
|
||||||
|
"targetType" : "TT_DESTROY",
|
||||||
|
"active" : 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"triggers" : [
|
||||||
|
{
|
||||||
|
"type" : "TRIGGER_WAYPOINT",
|
||||||
|
"targetName" : "Waypoint #5",
|
||||||
|
"targetValue" : "1",
|
||||||
|
"action" : "TA_ACTIVE_ENTITY",
|
||||||
|
"actionValue" : "Pandoran"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type" : "TRIGGER_WAYPOINT",
|
||||||
|
"targetName" : "Waypoint #5",
|
||||||
|
"targetValue" : "1",
|
||||||
|
"action" : "TA_ACTIVE_OBJECTIVE",
|
||||||
|
"actionValue" : "1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"player" : {
|
"player" : {
|
||||||
|
@ -36,7 +59,8 @@
|
||||||
"side" : "SIDE_PANDORAN",
|
"side" : "SIDE_PANDORAN",
|
||||||
"x" : 640,
|
"x" : 640,
|
||||||
"y" : 1000,
|
"y" : 1000,
|
||||||
"scatter" : 64
|
"scatter" : 64,
|
||||||
|
"active" : 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"entityGroups" : [
|
"entityGroups" : [
|
||||||
|
|
|
@ -46,6 +46,13 @@ void doEntities(void)
|
||||||
|
|
||||||
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
||||||
{
|
{
|
||||||
|
/* must always be shifted, even if not active */
|
||||||
|
if (e != player)
|
||||||
|
{
|
||||||
|
e->x -= battle.ssx;
|
||||||
|
e->y -= battle.ssy;
|
||||||
|
}
|
||||||
|
|
||||||
if (e->active)
|
if (e->active)
|
||||||
{
|
{
|
||||||
self = e;
|
self = e;
|
||||||
|
@ -59,12 +66,6 @@ void doEntities(void)
|
||||||
e->x += e->dx;
|
e->x += e->dx;
|
||||||
e->y += e->dy;
|
e->y += e->dy;
|
||||||
|
|
||||||
if (e != player)
|
|
||||||
{
|
|
||||||
e->x -= battle.ssx;
|
|
||||||
e->y -= battle.ssy;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e->action != NULL)
|
if (e->action != NULL)
|
||||||
{
|
{
|
||||||
if (--e->thinkTime <= 0)
|
if (--e->thinkTime <= 0)
|
||||||
|
|
|
@ -56,7 +56,7 @@ static void think(void)
|
||||||
self->angle -= 360;
|
self->angle -= 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player != NULL && getDistance(player->x, player->y, self->x, self->y) <= 32 && teamMatesClose())
|
if (player != NULL && getDistance(player->x, player->y, self->x, self->y) <= 64 && teamMatesClose())
|
||||||
{
|
{
|
||||||
self->health = 0;
|
self->health = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue