mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-12 19:12:31 +00:00
Merge branch 'master' into flame-shield-adjust
This commit is contained in:
commit
7cb574351d
10 changed files with 56 additions and 17 deletions
|
|
@ -514,6 +514,7 @@ extern tic_t mapreset;
|
|||
extern boolean thwompsactive;
|
||||
extern SINT8 spbplace;
|
||||
|
||||
extern tic_t bombflashtimer; // Used to avoid causing seizures if multiple mines explode close to you :)
|
||||
extern boolean legitimateexit;
|
||||
extern boolean comebackshowninfo;
|
||||
extern tic_t curlap, bestlap;
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ boolean thwompsactive; // Thwomps activate on lap 2
|
|||
SINT8 spbplace; // SPB exists, give the person behind better items
|
||||
|
||||
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
|
||||
tic_t bombflashtimer = 0; // Cooldown before another FlashPal can be intialized by a bomb exploding near a displayplayer. Avoids seizures.
|
||||
boolean legitimateexit; // Did this client actually finish the match?
|
||||
boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
|
||||
tic_t curlap; // Current lap time
|
||||
|
|
|
|||
31
src/k_kart.c
31
src/k_kart.c
|
|
@ -2790,10 +2790,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b
|
|||
K_PlayPainSound(player->mo);
|
||||
|
||||
if (P_IsDisplayPlayer(player))
|
||||
{
|
||||
quake.intensity = 64*FRACUNIT;
|
||||
quake.time = 5;
|
||||
}
|
||||
P_StartQuake(64<<FRACBITS, 5);
|
||||
|
||||
player->kartstuff[k_instashield] = 15;
|
||||
K_DropItems(player);
|
||||
|
|
@ -2957,6 +2954,8 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32
|
|||
}
|
||||
}
|
||||
|
||||
#define MINEQUAKEDIST 4096
|
||||
|
||||
// Spawns the purely visual explosion
|
||||
void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
||||
{
|
||||
|
|
@ -2965,6 +2964,28 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
mobj_t *dust;
|
||||
mobj_t *truc;
|
||||
INT32 speed, speed2;
|
||||
INT32 pnum;
|
||||
player_t *p;
|
||||
|
||||
// check for potential display players near the source so we can have a sick earthquake / flashpal.
|
||||
for (pnum = 0; pnum < MAXPLAYERS; pnum++)
|
||||
{
|
||||
p = &players[pnum];
|
||||
|
||||
if (!playeringame[pnum] || !P_IsDisplayPlayer(p))
|
||||
continue;
|
||||
|
||||
if (R_PointToDist2(p->mo->x, p->mo->y, source->x, source->y) < mapobjectscale*MINEQUAKEDIST)
|
||||
{
|
||||
P_StartQuake(55<<FRACBITS, 12);
|
||||
if (!bombflashtimer && P_CheckSight(p->mo, source))
|
||||
{
|
||||
bombflashtimer = TICRATE*2;
|
||||
P_FlashPal(p, 1, 1);
|
||||
}
|
||||
break; // we can break right now because quakes are global to all split players somehow.
|
||||
}
|
||||
}
|
||||
|
||||
K_MatchGenericExtraFlags(smoldering, source);
|
||||
smoldering->tics = TICRATE*3;
|
||||
|
|
@ -3035,6 +3056,8 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
}
|
||||
}
|
||||
|
||||
#undef MINEQUAKEDIST
|
||||
|
||||
static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t an, INT32 flags2, fixed_t speed)
|
||||
{
|
||||
mobj_t *th;
|
||||
|
|
|
|||
|
|
@ -1519,8 +1519,7 @@ static int lib_pStartQuake(lua_State *L)
|
|||
quake.radius = luaL_optinteger(L, 4, 512*FRACUNIT);
|
||||
|
||||
// These things are actually used in 2.1.
|
||||
quake.intensity = q_intensity;
|
||||
quake.time = q_time;
|
||||
P_StartQuake(q_intensity, q_time);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3192,10 +3192,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
K_KartPainEnergyFling(player);
|
||||
|
||||
if (P_IsDisplayPlayer(player))
|
||||
{
|
||||
quake.intensity = 32*FRACUNIT;
|
||||
quake.time = 5;
|
||||
}
|
||||
P_StartQuake(32<<FRACBITS, 5);
|
||||
}
|
||||
else
|
||||
K_SpinPlayer(player, source, 0, inflictor, false);
|
||||
|
|
|
|||
|
|
@ -1941,7 +1941,7 @@ static boolean PIT_CheckLine(line_t *ld)
|
|||
{
|
||||
if (ld->flags & ML_IMPASSABLE) // block objects from moving through this linedef.
|
||||
return false;
|
||||
if (tmthing->player && ld->flags & ML_BLOCKPLAYERS)
|
||||
if (tmthing->player && !tmthing->player->spectator && ld->flags & ML_BLOCKPLAYERS)
|
||||
return false; // SRB2Kart: Only block players, not items
|
||||
}
|
||||
|
||||
|
|
@ -3307,7 +3307,7 @@ static boolean PTR_SlideTraverse(intercept_t *in)
|
|||
if (li->flags & ML_IMPASSABLE)
|
||||
goto isblocking;
|
||||
|
||||
if (slidemo->player && li->flags & ML_BLOCKPLAYERS)
|
||||
if (slidemo->player && !slidemo->player->spectator && li->flags & ML_BLOCKPLAYERS)
|
||||
goto isblocking;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8728,7 +8728,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
fixed_t destx, desty;
|
||||
statenum_t curstate;
|
||||
statenum_t underlayst = S_NULL;
|
||||
INT32 flamemax = mobj->target->player->kartstuff[k_flamelength] * flameseg;
|
||||
INT32 flamemax = 0;
|
||||
|
||||
if (!mobj->target || !mobj->target->health || !mobj->target->player
|
||||
|| mobj->target->player->kartstuff[k_curshield] != KSHIELD_FLAME)
|
||||
|
|
@ -8736,6 +8736,9 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
|
||||
flamemax = mobj->target->player->kartstuff[k_flamelength] * flameseg;
|
||||
|
||||
P_SetScale(mobj, (mobj->destscale = (5*mobj->target->scale)>>2));
|
||||
|
||||
curstate = ((mobj->tics == 1) ? (mobj->state->nextstate) : ((statenum_t)(mobj->state-states)));
|
||||
|
|
|
|||
|
|
@ -8273,3 +8273,11 @@ static void P_SearchForDisableLinedefs(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rudimentary function to start a earthquake.
|
||||
// epicenter and radius are not yet used.
|
||||
void P_StartQuake(fixed_t intensity, tic_t time)
|
||||
{
|
||||
quake.intensity = intensity;
|
||||
quake.time = time;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
|
||||
extern mobj_t *skyboxmo[2];
|
||||
|
||||
// Something that should've been done long ago???
|
||||
// We won't be using epicenter or radius anytime soon so I don't think it's worth it yet.
|
||||
void P_StartQuake(fixed_t intensity, tic_t time);
|
||||
|
||||
// GETSECSPECIAL (specialval, section)
|
||||
//
|
||||
// Pulls out the special # from a particular section.
|
||||
|
|
|
|||
|
|
@ -722,6 +722,9 @@ void P_Ticker(boolean run)
|
|||
K_CalculateBattleWanted();
|
||||
}
|
||||
|
||||
if (bombflashtimer)
|
||||
bombflashtimer--; // Bomb seizure prevention
|
||||
|
||||
if (quake.time)
|
||||
{
|
||||
fixed_t ir = quake.intensity>>1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue