Ideya fixes when a player has more than one Ideya

# Conflicts:
#	src/p_inter.c

# Conflicts:
#	src/p_inter.c
This commit is contained in:
mazmazz 2018-08-14 17:28:51 -04:00
parent 00cadfee3a
commit 655b590c06
2 changed files with 15 additions and 4 deletions

View file

@ -840,8 +840,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
P_SetTarget(&orbittarget->hnext, toucher->tracer);
P_SetTarget(&orbittarget->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
P_SetTarget(&orbittarget->hnext->target, anchorpoint ? anchorpoint : orbittarget); // goalpost
if (!orbittarget->hnext->hnext)
P_SetTarget(&orbittarget->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
else
P_SetTarget(&orbittarget->hnext->hnext->target, anchorpoint ? anchorpoint : orbittarget);
P_SetTarget(&orbittarget->hnext->target, anchorpoint ? anchorpoint : orbittarget);
P_SetTarget(&toucher->tracer, NULL);
if (hnext)
@ -993,8 +996,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (player->powers[pw_carry] == CR_NIGHTSMODE && !toucher->target)
return;
if (toucher->tracer)
return; // Don't have multiple ideya
if (toucher->tracer && toucher->tracer->health > 0)
return; // Don't have multiple ideya, unless it's the first one given (health = 0)
if (player->mare != special->threshold) // wrong mare
return;

View file

@ -6085,6 +6085,14 @@ static void P_DoNiGHTSCapsule(player_t *player)
idya->health = player->mare + 1; // for identification
P_SetTarget(&idya->target, player->mo);
P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate + ((player->mare + 1) % 5));
if (player->mo->tracer)
{
P_SetTarget(&idya->hnext, player->mo->tracer);
idya->extravalue1 = (angle_t)(player->mo->tracer->extravalue1 - 72*ANG1);
if (idya->extravalue1 > player->mo->tracer->extravalue1)
idya->extravalue1 -= (72*ANG1)/idya->extravalue1;
}
P_SetTarget(&player->mo->tracer, idya);
}
for (i = 0; i < MAXPLAYERS; i++)