mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-20 08:20:52 +00:00
Merge branch 'nights-onfootcapsulefix' into nights-fastercapsule
This commit is contained in:
commit
02aed5b019
3 changed files with 19 additions and 3 deletions
|
@ -799,10 +799,15 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if (toucher->tracer) // Move the ideya over to the drone!
|
if (toucher->tracer) // Move the ideya over to the drone!
|
||||||
{
|
{
|
||||||
mobj_t *hnext = special->hnext;
|
mobj_t *hnext = special->hnext;
|
||||||
|
|
||||||
P_SetTarget(&special->hnext, toucher->tracer);
|
P_SetTarget(&special->hnext, toucher->tracer);
|
||||||
|
if (!special->hnext->hnext)
|
||||||
P_SetTarget(&special->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
|
P_SetTarget(&special->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
|
||||||
|
else
|
||||||
|
P_SetTarget(&special->hnext->hnext->target, special);
|
||||||
P_SetTarget(&special->hnext->target, special);
|
P_SetTarget(&special->hnext->target, special);
|
||||||
P_SetTarget(&toucher->tracer, NULL);
|
P_SetTarget(&toucher->tracer, NULL);
|
||||||
|
|
||||||
if (hnext)
|
if (hnext)
|
||||||
{
|
{
|
||||||
special->hnext->extravalue1 = (angle_t)(hnext->extravalue1 - 72*ANG1);
|
special->hnext->extravalue1 = (angle_t)(hnext->extravalue1 - 72*ANG1);
|
||||||
|
@ -958,8 +963,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if (player->powers[pw_carry] == CR_NIGHTSMODE && !toucher->target)
|
if (player->powers[pw_carry] == CR_NIGHTSMODE && !toucher->target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (toucher->tracer)
|
if (toucher->tracer && toucher->tracer->health > 0)
|
||||||
return; // Don't have multiple ideya
|
return; // Don't have multiple ideya, unless it's the first one given (health = 0)
|
||||||
|
|
||||||
if (player->mare != special->threshold) // wrong mare
|
if (player->mare != special->threshold) // wrong mare
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -9449,6 +9449,7 @@ void P_SpawnPlayer(INT32 playernum)
|
||||||
if (p == players) // this is totally the wrong place to do this aaargh.
|
if (p == players) // this is totally the wrong place to do this aaargh.
|
||||||
{
|
{
|
||||||
mobj_t *idya = P_SpawnMobjFromMobj(mobj, 0, 0, mobj->height, MT_GOTEMERALD);
|
mobj_t *idya = P_SpawnMobjFromMobj(mobj, 0, 0, mobj->height, MT_GOTEMERALD);
|
||||||
|
idya->health = 0; // for identification
|
||||||
P_SetTarget(&idya->target, mobj);
|
P_SetTarget(&idya->target, mobj);
|
||||||
P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate);
|
P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate);
|
||||||
P_SetTarget(&mobj->tracer, idya);
|
P_SetTarget(&mobj->tracer, idya);
|
||||||
|
|
10
src/p_user.c
10
src/p_user.c
|
@ -6071,6 +6071,7 @@ static void P_DoNiGHTSCapsule(player_t *player)
|
||||||
UINT8 em = P_GetNextEmerald();
|
UINT8 em = P_GetNextEmerald();
|
||||||
// Only give it to ONE person, and THAT player has to get to the goal!
|
// Only give it to ONE person, and THAT player has to get to the goal!
|
||||||
mobj_t *emmo = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->height, MT_GOTEMERALD);
|
mobj_t *emmo = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->height, MT_GOTEMERALD);
|
||||||
|
emmo->health = em; // for identification
|
||||||
P_SetTarget(&emmo->target, player->mo);
|
P_SetTarget(&emmo->target, player->mo);
|
||||||
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
|
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
|
||||||
P_SetTarget(&player->mo->tracer, emmo);
|
P_SetTarget(&player->mo->tracer, emmo);
|
||||||
|
@ -6097,8 +6098,17 @@ static void P_DoNiGHTSCapsule(player_t *player)
|
||||||
}*/
|
}*/
|
||||||
mobj_t *idya = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->height, MT_GOTEMERALD);
|
mobj_t *idya = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->height, MT_GOTEMERALD);
|
||||||
idya->extravalue2 = player->mare/5;
|
idya->extravalue2 = player->mare/5;
|
||||||
|
idya->health = player->mare + 1; // for identification
|
||||||
P_SetTarget(&idya->target, player->mo);
|
P_SetTarget(&idya->target, player->mo);
|
||||||
P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate + ((player->mare + 1) % 5));
|
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);
|
P_SetTarget(&player->mo->tracer, idya);
|
||||||
}
|
}
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
|
Loading…
Reference in a new issue