mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'master' into big-boost
This commit is contained in:
commit
b28450313b
4 changed files with 61 additions and 28 deletions
|
|
@ -675,6 +675,12 @@ static inline BlockItReturn_t PIT_LightningShieldAttack(mobj_t *thing)
|
|||
return BMIT_ABORT;
|
||||
}
|
||||
|
||||
if (thing == NULL || P_MobjWasRemoved(thing))
|
||||
{
|
||||
// Invalid?
|
||||
return BMIT_ABORT;
|
||||
}
|
||||
|
||||
if (thing == lightningSource)
|
||||
{
|
||||
// Don't explode yourself!!
|
||||
|
|
|
|||
49
src/k_kart.c
49
src/k_kart.c
|
|
@ -357,15 +357,15 @@ static INT32 K_KartItemOddsRace[NUMKARTRESULTS-1][8] =
|
|||
/*Invincibility*/ { 0, 0, 0, 0, 3, 4, 6, 9 }, // Invincibility
|
||||
/*Banana*/ { 2, 3, 1, 0, 0, 0, 0, 0 }, // Banana
|
||||
/*Eggman Monitor*/ { 1, 2, 0, 0, 0, 0, 0, 0 }, // Eggman Monitor
|
||||
/*Orbinaut*/ { 5, 4, 2, 2, 0, 0, 0, 0 }, // Orbinaut
|
||||
/*Jawz*/ { 0, 3, 2, 1, 1, 0, 0, 0 }, // Jawz
|
||||
/*Mine*/ { 0, 2, 3, 1, 0, 0, 0, 0 }, // Mine
|
||||
/*Orbinaut*/ { 5, 5, 2, 2, 0, 0, 0, 0 }, // Orbinaut
|
||||
/*Jawz*/ { 0, 4, 2, 1, 0, 0, 0, 0 }, // Jawz
|
||||
/*Mine*/ { 0, 3, 3, 1, 0, 0, 0, 0 }, // Mine
|
||||
/*Land Mine*/ { 3, 0, 0, 0, 0, 0, 0, 0 }, // Land Mine
|
||||
/*Ballhog*/ { 0, 0, 2, 2, 0, 0, 0, 0 }, // Ballhog
|
||||
/*Self-Propelled Bomb*/ { 0, 0, 0, 0, 0, 2, 4, 0 }, // Self-Propelled Bomb
|
||||
/*Grow*/ { 0, 0, 0, 1, 2, 3, 0, 0 }, // Grow
|
||||
/*Shrink*/ { 0, 0, 0, 0, 0, 0, 2, 0 }, // Shrink
|
||||
/*Lightning Shield*/ { 1, 2, 0, 0, 0, 0, 0, 0 }, // Lightning Shield
|
||||
/*Lightning Shield*/ { 1, 0, 0, 0, 0, 0, 0, 0 }, // Lightning Shield
|
||||
/*Bubble Shield*/ { 0, 1, 2, 1, 0, 0, 0, 0 }, // Bubble Shield
|
||||
/*Flame Shield*/ { 0, 0, 0, 0, 0, 1, 3, 5 }, // Flame Shield
|
||||
/*Hyudoro*/ { 3, 0, 0, 0, 0, 0, 0, 0 }, // Hyudoro
|
||||
|
|
@ -373,13 +373,13 @@ static INT32 K_KartItemOddsRace[NUMKARTRESULTS-1][8] =
|
|||
/*Super Ring*/ { 2, 1, 1, 0, 0, 0, 0, 0 }, // Super Ring
|
||||
/*Kitchen Sink*/ { 0, 0, 0, 0, 0, 0, 0, 0 }, // Kitchen Sink
|
||||
/*Drop Target*/ { 3, 0, 0, 0, 0, 0, 0, 0 }, // Drop Target
|
||||
/*Sneaker x2*/ { 0, 0, 2, 2, 1, 0, 0, 0 }, // Sneaker x2
|
||||
/*Sneaker x3*/ { 0, 0, 0, 2, 6,10, 5, 0 }, // Sneaker x3
|
||||
/*Sneaker x2*/ { 0, 0, 2, 2, 2, 0, 0, 0 }, // Sneaker x2
|
||||
/*Sneaker x3*/ { 0, 0, 0, 1, 6,10, 5, 0 }, // Sneaker x3
|
||||
/*Banana x3*/ { 0, 1, 1, 0, 0, 0, 0, 0 }, // Banana x3
|
||||
/*Banana x10*/ { 0, 0, 0, 1, 0, 0, 0, 0 }, // Banana x10
|
||||
/*Orbinaut x3*/ { 0, 0, 1, 0, 0, 0, 0, 0 }, // Orbinaut x3
|
||||
/*Orbinaut x4*/ { 0, 0, 0, 1, 1, 0, 0, 0 }, // Orbinaut x4
|
||||
/*Jawz x2*/ { 0, 0, 1, 2, 0, 0, 0, 0 } // Jawz x2
|
||||
/*Orbinaut x4*/ { 0, 0, 0, 2, 0, 0, 0, 0 }, // Orbinaut x4
|
||||
/*Jawz x2*/ { 0, 0, 1, 2, 1, 0, 0, 0 } // Jawz x2
|
||||
};
|
||||
|
||||
static INT32 K_KartItemOddsBattle[NUMKARTRESULTS][2] =
|
||||
|
|
@ -1700,9 +1700,13 @@ static void K_DrawDraftCombiring(player_t *player, player_t *victim, fixed_t cur
|
|||
UINT8 c;
|
||||
|
||||
if (maxdist == 0)
|
||||
c = 0;
|
||||
{
|
||||
c = leveltime % CHAOTIXBANDCOLORS;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = FixedMul(CHAOTIXBANDCOLORS<<FRACBITS, FixedDiv(curdist-minimumdist, maxdist-minimumdist)) >> FRACBITS;
|
||||
}
|
||||
|
||||
stepx = (victim->mo->x - player->mo->x) / CHAOTIXBANDLEN;
|
||||
stepy = (victim->mo->y - player->mo->y) / CHAOTIXBANDLEN;
|
||||
|
|
@ -1721,8 +1725,16 @@ static void K_DrawDraftCombiring(player_t *player, player_t *victim, fixed_t cur
|
|||
curz + (P_RandomRange(24,48)*mapobjectscale),
|
||||
MT_SIGNSPARKLE);
|
||||
|
||||
P_SetMobjState(band, S_SIGNSPARK1 + (leveltime % 11));
|
||||
P_SetScale(band, (band->destscale = (3*player->mo->scale)/2));
|
||||
if (maxdist == 0)
|
||||
{
|
||||
P_SetMobjState(band, S_KSPARK1 + (leveltime % 8));
|
||||
P_SetScale(band, (band->destscale = player->mo->scale));
|
||||
}
|
||||
else
|
||||
{
|
||||
P_SetMobjState(band, S_SIGNSPARK1 + (leveltime % 11));
|
||||
P_SetScale(band, (band->destscale = (3*player->mo->scale)/2));
|
||||
}
|
||||
|
||||
band->color = colors[c];
|
||||
band->colorized = true;
|
||||
|
|
@ -1892,9 +1904,14 @@ static void K_UpdateDraft(player_t *player)
|
|||
}
|
||||
|
||||
// No one to draft off of? Then you can knock that off.
|
||||
if (player->draftleeway) // Prevent small disruptions from stopping your draft.
|
||||
if (player->draftleeway > 0) // Prevent small disruptions from stopping your draft.
|
||||
{
|
||||
player->draftleeway--;
|
||||
if (P_IsObjectOnGround(player->mo) == true)
|
||||
{
|
||||
// Allow maintaining tether in air setpieces.
|
||||
player->draftleeway--;
|
||||
}
|
||||
|
||||
if (player->lastdraft >= 0
|
||||
&& player->lastdraft < MAXPLAYERS
|
||||
&& playeringame[player->lastdraft]
|
||||
|
|
@ -3108,6 +3125,12 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
draftspeed *= 2;
|
||||
}
|
||||
|
||||
if (player->itemtype == KITEM_LIGHTNINGSHIELD)
|
||||
{
|
||||
// infinite tether
|
||||
draftspeed *= 2;
|
||||
}
|
||||
|
||||
speedboost += FixedMul(draftspeed, player->draftpower); // (Drafting suffers no boost stack penalty.)
|
||||
numboosts++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14032,21 +14032,21 @@ void A_LightningFollowPlayer(mobj_t *actor)
|
|||
if (!actor->target)
|
||||
return;
|
||||
|
||||
if (actor->extravalue1) // Make the radius also follow the player somewhat accuratly
|
||||
{
|
||||
if (actor->extravalue1) // Make the radius also follow the player somewhat accuratly
|
||||
{
|
||||
sx = actor->target->x + FixedMul((actor->target->scale*actor->extravalue1), FINECOSINE((actor->angle)>>ANGLETOFINESHIFT));
|
||||
sy = actor->target->y + FixedMul((actor->target->scale*actor->extravalue1), FINESINE((actor->angle)>>ANGLETOFINESHIFT));
|
||||
P_MoveOrigin(actor, sx, sy, actor->target->z);
|
||||
}
|
||||
else // else just teleport to player directly
|
||||
P_MoveOrigin(actor, actor->target->x, actor->target->y, actor->target->z);
|
||||
|
||||
K_MatchGenericExtraFlags(actor, actor->target); // copy our target for graviflip
|
||||
actor->momx = actor->target->momx;
|
||||
actor->momy = actor->target->momy;
|
||||
actor->momz = actor->target->momz; // Give momentum since we don't teleport to our player literally every frame.
|
||||
sx = actor->target->x + FixedMul((actor->target->scale*actor->extravalue1), FINECOSINE((actor->angle)>>ANGLETOFINESHIFT));
|
||||
sy = actor->target->y + FixedMul((actor->target->scale*actor->extravalue1), FINESINE((actor->angle)>>ANGLETOFINESHIFT));
|
||||
P_MoveOrigin(actor, sx, sy, actor->target->z);
|
||||
}
|
||||
else // else just teleport to player directly
|
||||
{
|
||||
P_MoveOrigin(actor, actor->target->x, actor->target->y, actor->target->z);
|
||||
}
|
||||
|
||||
K_MatchGenericExtraFlags(actor, actor->target); // copy our target for graviflip
|
||||
actor->momx = actor->target->momx;
|
||||
actor->momy = actor->target->momy;
|
||||
actor->momz = actor->target->momz; // Give momentum since we don't teleport to our player literally every frame.
|
||||
}
|
||||
|
||||
// A_FZBoomFlash:
|
||||
|
|
|
|||
|
|
@ -11008,16 +11008,20 @@ void P_RespawnSpecials(void)
|
|||
else
|
||||
{
|
||||
if (pcount == 1) // No respawn when alone
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (pcount > 1)
|
||||
{
|
||||
time = (120 - ((pcount-2) * 10)) * TICRATE;
|
||||
time = (120 - ((pcount-2) * 20)) * TICRATE;
|
||||
|
||||
// If the map is longer or shorter than 3 laps, then adjust ring respawn to account for this.
|
||||
// 5 lap courses would have more retreaded ground, while 2 lap courses would have less.
|
||||
if ((mapheaderinfo[gamemap-1]->numlaps != 3)
|
||||
&& !(mapheaderinfo[gamemap-1]->levelflags & LF_SECTIONRACE))
|
||||
&& !(mapheaderinfo[gamemap-1]->levelflags & LF_SECTIONRACE))
|
||||
{
|
||||
time = (time * 3) / max(1, mapheaderinfo[gamemap-1]->numlaps);
|
||||
}
|
||||
|
||||
if (time < 10*TICRATE)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue