mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-21 17:41:48 +00:00
UCRP_RETURNMARKTOSENDER
"when cursed with Eggmark, blow up the racer responsible" Just a simple condition. Either it happens or it doesn't. MT_SPBEXPLOSION now tracks whether it was made by KITEM_EGGMAN or KITEM_SPB, too!
This commit is contained in:
parent
54137ad468
commit
9e1aec4298
7 changed files with 26 additions and 1 deletions
|
|
@ -414,6 +414,7 @@ struct roundconditions_t
|
|||
boolean spb_neuter;
|
||||
boolean landmine_dunk;
|
||||
boolean hit_midair;
|
||||
boolean returntosender_mark;
|
||||
|
||||
UINT8 hittrackhazard[((MAX_LAPS+1)/8) + 1];
|
||||
|
||||
|
|
|
|||
|
|
@ -2977,7 +2977,8 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|
|||
else if ((offset=0) || fastcmp(params[0], "TRIPWIREHYUU")
|
||||
|| (++offset && fastcmp(params[0], "SPBNEUTER"))
|
||||
|| (++offset && fastcmp(params[0], "LANDMINEDUNK"))
|
||||
|| (++offset && fastcmp(params[0], "HITMIDAIR")))
|
||||
|| (++offset && fastcmp(params[0], "HITMIDAIR"))
|
||||
|| (++offset && fastcmp(params[0], "RETURNMARKTOSENDER")))
|
||||
{
|
||||
//PARAMCHECK(1);
|
||||
ty = UCRP_TRIPWIREHYUU + offset;
|
||||
|
|
|
|||
|
|
@ -8410,6 +8410,10 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
eggsexplode->height = 2 * player->mo->height;
|
||||
K_FlipFromObject(eggsexplode, player->mo);
|
||||
|
||||
eggsexplode->threshold = KITEM_EGGMAN;
|
||||
|
||||
P_SetTarget(&eggsexplode->tracer, player->mo);
|
||||
|
||||
if (player->eggmanblame >= 0
|
||||
&& player->eggmanblame < MAXPLAYERS
|
||||
&& playeringame[player->eggmanblame]
|
||||
|
|
|
|||
|
|
@ -1619,6 +1619,8 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
|||
return (player->roundconditions.landmine_dunk);
|
||||
case UCRP_HITMIDAIR:
|
||||
return (player->roundconditions.hit_midair);
|
||||
case UCRP_RETURNMARKTOSENDER:
|
||||
return (player->roundconditions.returntosender_mark);
|
||||
|
||||
case UCRP_TRACKHAZARD:
|
||||
{
|
||||
|
|
@ -2387,6 +2389,8 @@ static const char *M_GetConditionString(condition_t *cn)
|
|||
return "dunk a Landmine on another racer's head";
|
||||
case UCRP_HITMIDAIR:
|
||||
return "hit another racer with a projectile while you're both in the air";
|
||||
case UCRP_RETURNMARKTOSENDER:
|
||||
return "when cursed with Eggmark, blow up the racer responsible";
|
||||
|
||||
case UCRP_TRACKHAZARD:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ typedef enum
|
|||
UCRP_SPBNEUTER, // Kill an SPB with Lightning
|
||||
UCRP_LANDMINEDUNK, // huh? you died? that's weird. all i did was try to hug you...
|
||||
UCRP_HITMIDAIR, // Hit another player mid-air with a kartfielditem
|
||||
UCRP_RETURNMARKTOSENDER, // Hit the player responsible for Eggman Marking you with that explosion
|
||||
|
||||
UCRP_TRACKHAZARD, // (Don't) get hit by a track hazard (maybe specific lap)
|
||||
|
||||
|
|
|
|||
|
|
@ -1025,6 +1025,8 @@ void Obj_SPBExplode(mobj_t *spb)
|
|||
P_SetTarget(&spbExplode->target, spb_owner(spb));
|
||||
}
|
||||
|
||||
spbExplode->threshold = KITEM_SPB;
|
||||
|
||||
// Tell the explosion to use alternate knockback.
|
||||
spbExplode->movefactor = ((SPB_CHASETIMESCALE - spb_chasetime(spb)) * SPB_CHASETIMEMUL) / SPB_CHASETIMESCALE;
|
||||
|
||||
|
|
|
|||
|
|
@ -2684,6 +2684,18 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
source->player->roundconditions.hit_midair = true;
|
||||
source->player->roundconditions.checkthisframe = true;
|
||||
}
|
||||
|
||||
if (source == target
|
||||
&& !P_MobjWasRemoved(inflictor)
|
||||
&& inflictor->type == MT_SPBEXPLOSION
|
||||
&& inflictor->threshold == KITEM_EGGMAN
|
||||
&& !P_MobjWasRemoved(inflictor->tracer)
|
||||
&& inflictor->tracer != source
|
||||
&& inflictor->tracer->player)
|
||||
{
|
||||
inflictor->tracer->player->roundconditions.returntosender_mark = true;
|
||||
inflictor->tracer->player->roundconditions.checkthisframe = true;
|
||||
}
|
||||
}
|
||||
else if (!(inflictor && inflictor->player)
|
||||
&& player->laps <= numlaps
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue