mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-24 22:41:27 +00:00
actaully I was incorrect, it didn't make it past it. Now it makes it TO it at least :V
This commit is contained in:
parent
5a6263c36b
commit
c665393bd0
16 changed files with 125 additions and 454 deletions
|
|
@ -1023,9 +1023,6 @@ void D_RegisterClientCommands(void)
|
|||
COM_AddCommand("scale", Command_Scale_f);
|
||||
COM_AddCommand("gravflip", Command_Gravflip_f);
|
||||
COM_AddCommand("hurtme", Command_Hurtme_f);
|
||||
/*COM_AddCommand("jumptoaxis", Command_JumpToAxis_f);
|
||||
COM_AddCommand("charability", Command_Charability_f);
|
||||
COM_AddCommand("charspeed", Command_Charspeed_f);*/
|
||||
COM_AddCommand("teleport", Command_Teleport_f);
|
||||
COM_AddCommand("rteleport", Command_RTeleport_f);
|
||||
COM_AddCommand("skynum", Command_Skynum_f);
|
||||
|
|
|
|||
|
|
@ -11424,7 +11424,7 @@ struct {
|
|||
{"DMG_CRUSHED",DMG_CRUSHED},
|
||||
{"DMG_SPECTATOR",DMG_SPECTATOR},
|
||||
//// Masks
|
||||
{"DMG_CANHURTSELF",DMG_CANHURTSELF},
|
||||
{"DMG_CANTHURTSELF",DMG_CANTHURTSELF},
|
||||
{"DMG_DEATHMASK",DMG_DEATHMASK},
|
||||
|
||||
// Intermission types
|
||||
|
|
|
|||
|
|
@ -1180,18 +1180,8 @@ static UINT8 HWR_GetModelSprite2(md2_t *md2, skin_t *skin, UINT8 spr2, player_t
|
|||
switch(spr2)
|
||||
{
|
||||
// Normal special cases.
|
||||
case SPR2_JUMP:
|
||||
spr2 = ((player
|
||||
? player->charflags
|
||||
: skin->flags)
|
||||
& SF_NOJUMPSPIN) ? SPR2_SPNG : SPR2_ROLL;
|
||||
break;
|
||||
case SPR2_TIRE:
|
||||
spr2 = ((player
|
||||
? player->charability
|
||||
: skin->ability)
|
||||
== CA_SWIM) ? SPR2_SWIM : SPR2_FLY;
|
||||
break;
|
||||
// (none in kart)
|
||||
|
||||
// Use the handy list, that's what it's there for!
|
||||
default:
|
||||
spr2 = spr2defaults[spr2];
|
||||
|
|
|
|||
|
|
@ -379,70 +379,6 @@ void Command_Hurtme_f(void)
|
|||
P_DamageMobj(players[consoleplayer].mo, NULL, NULL, atoi(COM_Argv(1)), 0);
|
||||
}
|
||||
|
||||
// Moves the NiGHTS player to another axis within the current mare
|
||||
/*void Command_JumpToAxis_f(void)
|
||||
{
|
||||
REQUIRE_DEVMODE;
|
||||
REQUIRE_INLEVEL;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
|
||||
if (COM_Argc() != 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("jumptoaxis <axisnum>: Jump to axis within current mare.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
P_TransferToAxis(&players[consoleplayer], atoi(COM_Argv(1)));
|
||||
}
|
||||
|
||||
void Command_Charability_f(void)
|
||||
{
|
||||
REQUIRE_DEVMODE;
|
||||
REQUIRE_INLEVEL;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
|
||||
if (COM_Argc() < 3)
|
||||
{
|
||||
CONS_Printf(M_GetText("charability <1/2> <value>: change character abilities\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (atoi(COM_Argv(1)) == 1)
|
||||
players[consoleplayer].charability = (UINT8)atoi(COM_Argv(2));
|
||||
else if (atoi(COM_Argv(1)) == 2)
|
||||
players[consoleplayer].charability2 = (UINT8)atoi(COM_Argv(2));
|
||||
else
|
||||
CONS_Printf(M_GetText("charability <1/2> <value>: change character abilities\n"));
|
||||
}
|
||||
|
||||
void Command_Charspeed_f(void)
|
||||
{
|
||||
REQUIRE_DEVMODE;
|
||||
REQUIRE_INLEVEL;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
|
||||
if (COM_Argc() < 3)
|
||||
{
|
||||
CONS_Printf(M_GetText("charspeed <normalspeed/runspeed/thrustfactor/accelstart/acceleration/actionspd> <value>: set character speed\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strcasecmp(COM_Argv(1), "normalspeed"))
|
||||
players[consoleplayer].normalspeed = atoi(COM_Argv(2))<<FRACBITS;
|
||||
else if (!strcasecmp(COM_Argv(1), "runspeed"))
|
||||
players[consoleplayer].runspeed = atoi(COM_Argv(2))<<FRACBITS;
|
||||
else if (!strcasecmp(COM_Argv(1), "thrustfactor"))
|
||||
players[consoleplayer].thrustfactor = atoi(COM_Argv(2));
|
||||
else if (!strcasecmp(COM_Argv(1), "accelstart"))
|
||||
players[consoleplayer].accelstart = atoi(COM_Argv(2));
|
||||
else if (!strcasecmp(COM_Argv(1), "acceleration"))
|
||||
players[consoleplayer].acceleration = atoi(COM_Argv(2));
|
||||
else if (!strcasecmp(COM_Argv(1), "actionspd"))
|
||||
players[consoleplayer].actionspd = atoi(COM_Argv(2))<<FRACBITS;
|
||||
else
|
||||
CONS_Printf(M_GetText("charspeed <normalspeed/runspeed/thrustfactor/accelstart/acceleration/actionspd> <value>: set character speed\n"));
|
||||
}*/
|
||||
|
||||
void Command_RTeleport_f(void)
|
||||
{
|
||||
fixed_t intx, inty, intz;
|
||||
|
|
|
|||
|
|
@ -53,9 +53,6 @@ void Command_Devmode_f(void);
|
|||
void Command_Scale_f(void);
|
||||
void Command_Gravflip_f(void);
|
||||
void Command_Hurtme_f(void);
|
||||
/*void Command_JumpToAxis_f(void);
|
||||
void Command_Charability_f(void);
|
||||
void Command_Charspeed_f(void);*/
|
||||
void Command_Teleport_f(void);
|
||||
void Command_RTeleport_f(void);
|
||||
void Command_Skynum_f(void);
|
||||
|
|
|
|||
|
|
@ -12791,7 +12791,7 @@ void A_MineExplode(mobj_t *actor)
|
|||
quake.intensity = 8*FRACUNIT;
|
||||
quake.time = TICRATE/3;
|
||||
|
||||
P_RadiusAttack(actor, actor->tracer, 192*FRACUNIT, DMG_CANHURTSELF, true);
|
||||
P_RadiusAttack(actor, actor->tracer, 192*FRACUNIT, 0, true);
|
||||
P_MobjCheckWater(actor);
|
||||
|
||||
{
|
||||
|
|
|
|||
130
src/p_floor.c
130
src/p_floor.c
|
|
@ -1666,123 +1666,43 @@ void T_CameraScanner(elevator_t *elevator)
|
|||
{
|
||||
// leveltime is compared to make multiple scanners in one map function correctly.
|
||||
static tic_t lastleveltime = 32000; // any number other than 0 should do here
|
||||
static boolean camerascanned, camerascanned2, camerascanned3, camerascanned4;
|
||||
static boolean camerascanned[MAXSPLITSCREENPLAYERS];
|
||||
UINT8 i;
|
||||
|
||||
if (leveltime != lastleveltime) // Back on the first camera scanner
|
||||
{
|
||||
camerascanned = camerascanned2 = camerascanned3 = camerascanned4 = false;
|
||||
memset(camerascanned, false, sizeof (camerascanned));
|
||||
lastleveltime = leveltime;
|
||||
}
|
||||
|
||||
if (players[g_localplayers[0]].mo)
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (players[g_localplayers[0]].mo->subsector->sector == elevator->actionsector)
|
||||
{
|
||||
if (t_cam_dist == -42)
|
||||
t_cam_dist = cv_cam_dist.value;
|
||||
if (t_cam_height == -42)
|
||||
t_cam_height = cv_cam_height.value;
|
||||
if (t_cam_rotate == -42)
|
||||
t_cam_rotate = cv_cam_rotate.value;
|
||||
CV_SetValue(&cv_cam_height, FixedInt(elevator->sector->floorheight));
|
||||
CV_SetValue(&cv_cam_dist, FixedInt(elevator->sector->ceilingheight));
|
||||
CV_SetValue(&cv_cam_rotate, elevator->distance);
|
||||
camerascanned = true;
|
||||
}
|
||||
else if (!camerascanned)
|
||||
{
|
||||
if (t_cam_height != -42 && cv_cam_height.value != t_cam_height)
|
||||
CV_Set(&cv_cam_height, va("%f", (double)FIXED_TO_FLOAT(t_cam_height)));
|
||||
if (t_cam_dist != -42 && cv_cam_dist.value != t_cam_dist)
|
||||
CV_Set(&cv_cam_dist, va("%f", (double)FIXED_TO_FLOAT(t_cam_dist)));
|
||||
if (t_cam_rotate != -42 && cv_cam_rotate.value != t_cam_rotate)
|
||||
CV_Set(&cv_cam_rotate, va("%f", (double)t_cam_rotate));
|
||||
if (!players[displayplayers[i]].mo || P_MobjWasRemoved(players[displayplayers[i]].mo))
|
||||
continue;
|
||||
|
||||
t_cam_dist = t_cam_height = t_cam_rotate = -42;
|
||||
}
|
||||
}
|
||||
|
||||
if (splitscreen && players[g_localplayers[1]].mo)
|
||||
{
|
||||
if (players[g_localplayers[1]].mo->subsector->sector == elevator->actionsector)
|
||||
if (players[displayplayers[i]].mo->subsector->sector == elevator->actionsector)
|
||||
{
|
||||
if (t_cam2_rotate == -42)
|
||||
t_cam2_dist = cv_cam2_dist.value;
|
||||
if (t_cam2_rotate == -42)
|
||||
t_cam2_height = cv_cam2_height.value;
|
||||
if (t_cam2_rotate == -42)
|
||||
t_cam2_rotate = cv_cam2_rotate.value;
|
||||
CV_SetValue(&cv_cam2_height, FixedInt(elevator->sector->floorheight));
|
||||
CV_SetValue(&cv_cam2_dist, FixedInt(elevator->sector->ceilingheight));
|
||||
CV_SetValue(&cv_cam2_rotate, elevator->distance);
|
||||
camerascanned2 = true;
|
||||
if (t_cam_dist[i] == -42)
|
||||
t_cam_dist[i] = cv_cam_dist[i].value;
|
||||
if (t_cam_height[i] == -42)
|
||||
t_cam_height[i] = cv_cam_height[i].value;
|
||||
if (t_cam_rotate[i] == -42)
|
||||
t_cam_rotate[i] = cv_cam_rotate[i].value;
|
||||
CV_SetValue(&cv_cam_height[i], FixedInt(elevator->sector->floorheight));
|
||||
CV_SetValue(&cv_cam_dist[i], FixedInt(elevator->sector->ceilingheight));
|
||||
CV_SetValue(&cv_cam_rotate[i], elevator->distance);
|
||||
camerascanned[i] = true;
|
||||
}
|
||||
else if (!camerascanned2)
|
||||
else if (!camerascanned[i])
|
||||
{
|
||||
if (t_cam2_height != -42 && cv_cam2_height.value != t_cam2_height)
|
||||
CV_Set(&cv_cam2_height, va("%f", (double)FIXED_TO_FLOAT(t_cam2_height)));
|
||||
if (t_cam2_dist != -42 && cv_cam2_dist.value != t_cam2_dist)
|
||||
CV_Set(&cv_cam2_dist, va("%f", (double)FIXED_TO_FLOAT(t_cam2_dist)));
|
||||
if (t_cam2_rotate != -42 && cv_cam2_rotate.value != t_cam2_rotate)
|
||||
CV_Set(&cv_cam2_rotate, va("%f", (double)t_cam2_rotate));
|
||||
if (t_cam_height[i] != -42 && cv_cam_height[i].value != t_cam_height[i])
|
||||
CV_Set(&cv_cam_height[i], va("%f", (double)FIXED_TO_FLOAT(t_cam_height[i])));
|
||||
if (t_cam_dist[i] != -42 && cv_cam_dist[i].value != t_cam_dist[i])
|
||||
CV_Set(&cv_cam_dist[i], va("%f", (double)FIXED_TO_FLOAT(t_cam_dist[i])));
|
||||
if (t_cam_rotate[i] != -42 && cv_cam_rotate[i].value != t_cam_rotate[i])
|
||||
CV_Set(&cv_cam_rotate[i], va("%f", (double)t_cam_rotate[i]));
|
||||
|
||||
t_cam2_dist = t_cam2_height = t_cam2_rotate = -42;
|
||||
}
|
||||
}
|
||||
|
||||
if (splitscreen > 1 && players[g_localplayers[2]].mo)
|
||||
{
|
||||
if (players[g_localplayers[2]].mo->subsector->sector == elevator->actionsector)
|
||||
{
|
||||
if (t_cam3_rotate == -42)
|
||||
t_cam3_dist = cv_cam3_dist.value;
|
||||
if (t_cam3_rotate == -42)
|
||||
t_cam3_height = cv_cam3_height.value;
|
||||
if (t_cam3_rotate == -42)
|
||||
t_cam3_rotate = cv_cam3_rotate.value;
|
||||
CV_SetValue(&cv_cam3_height, FixedInt(elevator->sector->floorheight));
|
||||
CV_SetValue(&cv_cam3_dist, FixedInt(elevator->sector->ceilingheight));
|
||||
CV_SetValue(&cv_cam3_rotate, elevator->distance);
|
||||
camerascanned3 = true;
|
||||
}
|
||||
else if (!camerascanned3)
|
||||
{
|
||||
if (t_cam3_height != -42 && cv_cam3_height.value != t_cam3_height)
|
||||
CV_Set(&cv_cam3_height, va("%f", (double)FIXED_TO_FLOAT(t_cam3_height)));
|
||||
if (t_cam3_dist != -42 && cv_cam3_dist.value != t_cam3_dist)
|
||||
CV_Set(&cv_cam3_dist, va("%f", (double)FIXED_TO_FLOAT(t_cam3_dist)));
|
||||
if (t_cam3_rotate != -42 && cv_cam3_rotate.value != t_cam3_rotate)
|
||||
CV_Set(&cv_cam3_rotate, va("%f", (double)t_cam3_rotate));
|
||||
|
||||
t_cam3_dist = t_cam3_height = t_cam3_rotate = -42;
|
||||
}
|
||||
}
|
||||
|
||||
if (splitscreen > 2 && players[g_localplayers[3]].mo)
|
||||
{
|
||||
if (players[g_localplayers[3]].mo->subsector->sector == elevator->actionsector)
|
||||
{
|
||||
if (t_cam4_rotate == -42)
|
||||
t_cam4_dist = cv_cam4_dist.value;
|
||||
if (t_cam4_rotate == -42)
|
||||
t_cam4_height = cv_cam4_height.value;
|
||||
if (t_cam4_rotate == -42)
|
||||
t_cam4_rotate = cv_cam4_rotate.value;
|
||||
CV_SetValue(&cv_cam4_height, FixedInt(elevator->sector->floorheight));
|
||||
CV_SetValue(&cv_cam4_dist, FixedInt(elevator->sector->ceilingheight));
|
||||
CV_SetValue(&cv_cam4_rotate, elevator->distance);
|
||||
camerascanned4 = true;
|
||||
}
|
||||
else if (!camerascanned4)
|
||||
{
|
||||
if (t_cam4_height != -42 && cv_cam4_height.value != t_cam4_height)
|
||||
CV_Set(&cv_cam4_height, va("%f", (double)FIXED_TO_FLOAT(t_cam4_height)));
|
||||
if (t_cam4_dist != -42 && cv_cam4_dist.value != t_cam4_dist)
|
||||
CV_Set(&cv_cam4_dist, va("%f", (double)FIXED_TO_FLOAT(t_cam4_dist)));
|
||||
if (t_cam4_rotate != -42 && cv_cam4_rotate.value != t_cam4_rotate)
|
||||
CV_Set(&cv_cam4_rotate, va("%f", (double)t_cam4_rotate));
|
||||
|
||||
t_cam4_dist = t_cam4_height = t_cam4_rotate = -42;
|
||||
t_cam_dist[i] = t_cam_height[i] = t_cam_rotate[i] = -42;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -688,9 +688,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
*/
|
||||
void P_TouchStarPost(mobj_t *post, player_t *player, boolean snaptopost)
|
||||
{
|
||||
size_t i;
|
||||
mobj_t *toucher = player->mo;
|
||||
mobj_t *checkbase = snaptopost ? post : toucher;
|
||||
|
||||
(void)snaptopost;
|
||||
|
||||
if (player->bot)
|
||||
return;
|
||||
|
|
@ -1047,7 +1047,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
//if (inflictor && (inflictor->type == MT_SHELL || inflictor->type == MT_FIREBALL))
|
||||
// P_SetTarget(&target->tracer, inflictor);
|
||||
|
||||
if (!(maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap) && target->player && target->player->nightstime > 6)
|
||||
if (G_IsSpecialStage(gamemap) && target->player && target->player->nightstime > 6)
|
||||
target->player->nightstime = 6; // Just let P_Ticker take care of the rest.
|
||||
|
||||
if (target->flags & (MF_ENEMY|MF_BOSS))
|
||||
|
|
@ -1449,7 +1449,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
if (target->type == MT_FROGGER)
|
||||
{
|
||||
if (target->tracer && !P_MobjWasRemoved(target->tracer))
|
||||
P_KillMobj(target->tracer, inflictor, source);
|
||||
P_KillMobj(target->tracer, inflictor, source, 0);
|
||||
}
|
||||
|
||||
if (target->type == MT_FROGGER || target->type == MT_ROBRA_HEAD || target->type == MT_BLUEROBRA_HEAD) // clean hnext list
|
||||
|
|
@ -1479,6 +1479,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
P_InstaThrust(target, R_PointToAngle2(inflictor->x, inflictor->y, target->x, target->y)+ANGLE_90, 16<<FRACBITS);
|
||||
}
|
||||
|
||||
// Final state setting - do something instead of P_SetMobjState;
|
||||
// Final state setting - do something instead of P_SetMobjState;
|
||||
if (target->type == MT_SPIKE && target->info->deathstate != S_NULL)
|
||||
{
|
||||
|
|
@ -1515,6 +1516,26 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
#undef makechunk
|
||||
}
|
||||
|
||||
momz = 7*scale;
|
||||
if (flip)
|
||||
momz *= -1;
|
||||
|
||||
chunk = P_SpawnMobjFromMobj(target, 0, 0, 0, MT_SPIKE);
|
||||
P_SetMobjState(chunk, target->info->deathstate);
|
||||
chunk->health = 0;
|
||||
chunk->angle = ang + ANGLE_180;
|
||||
P_UnsetThingPosition(chunk);
|
||||
chunk->flags = MF_NOCLIP;
|
||||
chunk->x -= xoffs;
|
||||
chunk->y -= yoffs;
|
||||
if (flip)
|
||||
chunk->z -= 12*scale;
|
||||
else
|
||||
chunk->z += 12*scale;
|
||||
P_SetThingPosition(chunk);
|
||||
P_InstaThrust(chunk, chunk->angle, 2*scale);
|
||||
chunk->momz = momz;
|
||||
|
||||
P_SetMobjState(target, target->info->deathstate);
|
||||
target->health = 0;
|
||||
target->angle = ang;
|
||||
|
|
@ -1603,10 +1624,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
}
|
||||
else if (target->player)
|
||||
{
|
||||
if (damagetype == DMG_DROWNED || damagetype == DMG_SPACEDROWN)
|
||||
P_SetPlayerMobjState(target, target->info->xdeathstate);
|
||||
else
|
||||
P_SetPlayerMobjState(target, target->info->deathstate);
|
||||
P_SetPlayerMobjState(target, target->info->deathstate);
|
||||
}
|
||||
else
|
||||
#ifdef DEBUG_NULL_DEATHSTATE
|
||||
|
|
@ -1622,7 +1640,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
|
||||
static boolean P_PlayerHitsPlayer(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 damage, UINT8 damagetype)
|
||||
{
|
||||
player_t *player = target->player;
|
||||
(void)inflictor;
|
||||
(void)damage;
|
||||
|
||||
// SRB2Kart: We want to hurt ourselves
|
||||
if (damagetype & DMG_CANTHURTSELF)
|
||||
|
|
@ -1637,6 +1656,8 @@ static boolean P_PlayerHitsPlayer(mobj_t *target, mobj_t *inflictor, mobj_t *sou
|
|||
|
||||
static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage)
|
||||
{
|
||||
(void)source;
|
||||
|
||||
player->pflags &= ~PF_SLIDING;
|
||||
|
||||
player->powers[pw_carry] = CR_NONE;
|
||||
|
|
@ -1880,13 +1901,13 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
{
|
||||
INT32 i;
|
||||
mobj_t *mo;
|
||||
angle_t fa, va;
|
||||
angle_t fa;
|
||||
fixed_t ns;
|
||||
fixed_t z;
|
||||
fixed_t momxy = 5<<FRACBITS, momz = 12<<FRACBITS; // base horizonal/vertical thrusts
|
||||
|
||||
// Rings shouldn't be in Battle!
|
||||
if ((gametyperules & GTR_BUMPERS))
|
||||
if (!(gametyperules & GTR_RINGS))
|
||||
return;
|
||||
|
||||
// Better safe than sorry.
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ typedef struct BasicFF_s
|
|||
#define DMG_CRUSHED 0x80+4
|
||||
#define DMG_SPECTATOR 0x80+5
|
||||
// Masks
|
||||
#define DMG_CANHURTSELF 0x40 // Flag - can hurt self/team indirectly, such as through mines
|
||||
#define DMG_CANTHURTSELF 0x40 // Flag - cannot hurt your self or your team
|
||||
#define DMG_DEATHMASK DMG_INSTAKILL // if bit 7 is set, this is a death type instead of a damage type
|
||||
|
||||
void P_ForceFeed(const player_t *player, INT32 attack, INT32 fade, tic_t duration, INT32 period);
|
||||
|
|
|
|||
59
src/p_map.c
59
src/p_map.c
|
|
@ -239,7 +239,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
const fixed_t vscale = mapobjectscale + (object->scale - mapobjectscale);
|
||||
fixed_t vertispeed = spring->info->mass;
|
||||
fixed_t horizspeed = spring->info->damage;
|
||||
UINT8 starcolor = (spring->info->painchance % MAXTRANSLATIONS);
|
||||
UINT16 starcolor = (spring->info->painchance % numskincolors);
|
||||
fixed_t savemomx = 0;
|
||||
fixed_t savemomy = 0;
|
||||
|
||||
|
|
@ -449,33 +449,6 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object)
|
|||
}
|
||||
}
|
||||
|
||||
static void P_PlayerBarrelCollide(mobj_t *toucher, mobj_t *barrel)
|
||||
{
|
||||
if (toucher->momz < 0)
|
||||
{
|
||||
if (toucher->z + toucher->momz > barrel->z + barrel->height)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (toucher->z > barrel->z + barrel->height)
|
||||
return;
|
||||
}
|
||||
|
||||
if (toucher->momz > 0)
|
||||
{
|
||||
if (toucher->z + toucher->height + toucher->momz < barrel->z)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (toucher->z + toucher->height < barrel->z)
|
||||
return;
|
||||
}
|
||||
|
||||
P_DamageMobj(barrel, toucher, toucher, 1, 0);
|
||||
}
|
||||
|
||||
//
|
||||
// PIT_CheckThing
|
||||
//
|
||||
|
|
@ -1135,13 +1108,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
if (thing->z + thing->height <= tmthing->z + FixedMul(FRACUNIT, tmthing->scale)
|
||||
&& thing->z + thing->height + thing->momz >= tmthing->z + FixedMul(FRACUNIT, tmthing->scale) + tmthing->momz
|
||||
&& !(thing->player->charability == CA_BOUNCE && thing->player->panim == PA_ABILITY && thing->eflags & MFE_VERTICALFLIP))
|
||||
&& thing->z + thing->height + thing->momz >= tmthing->z + FixedMul(FRACUNIT, tmthing->scale) + tmthing->momz)
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE);
|
||||
}
|
||||
else if (thing->z >= tmthing->z + tmthing->height - FixedMul(FRACUNIT, tmthing->scale)
|
||||
&& thing->z + thing->momz <= tmthing->z + tmthing->height - FixedMul(FRACUNIT, tmthing->scale) + tmthing->momz
|
||||
&& !(thing->player->charability == CA_BOUNCE && thing->player->panim == PA_ABILITY && !(thing->eflags & MFE_VERTICALFLIP)))
|
||||
&& thing->z + thing->momz <= tmthing->z + tmthing->height - FixedMul(FRACUNIT, tmthing->scale) + tmthing->momz)
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE);
|
||||
}
|
||||
else if (thing->type == MT_SPIKE && thing->flags & MF_SOLID && tmthing->player) // unfortunate player falls into spike?!
|
||||
|
|
@ -1149,13 +1120,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
if (tmthing->z + tmthing->height <= thing->z - FixedMul(FRACUNIT, thing->scale)
|
||||
&& tmthing->z + tmthing->height + tmthing->momz >= thing->z - FixedMul(FRACUNIT, thing->scale)
|
||||
&& !(tmthing->player->charability == CA_BOUNCE && tmthing->player->panim == PA_ABILITY && tmthing->eflags & MFE_VERTICALFLIP))
|
||||
&& tmthing->z + tmthing->height + tmthing->momz >= thing->z - FixedMul(FRACUNIT, thing->scale))
|
||||
P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE);
|
||||
}
|
||||
else if (tmthing->z >= thing->z + thing->height + FixedMul(FRACUNIT, thing->scale)
|
||||
&& tmthing->z + tmthing->momz <= thing->z + thing->height + FixedMul(FRACUNIT, thing->scale)
|
||||
&& !(tmthing->player->charability == CA_BOUNCE && tmthing->player->panim == PA_ABILITY && !(tmthing->eflags & MFE_VERTICALFLIP)))
|
||||
&& tmthing->z + tmthing->momz <= thing->z + thing->height + FixedMul(FRACUNIT, thing->scale))
|
||||
P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE);
|
||||
}
|
||||
|
||||
|
|
@ -1251,15 +1220,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
else if (thing->scale > tmthing->scale + (mapobjectscale/8))
|
||||
K_SquishPlayer(tmthing->player, thing, tmthing);
|
||||
else if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer]) // SRB2kart - Then invincibility!
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1);
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1, 0);
|
||||
else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer])
|
||||
P_DamageMobj(tmthing, thing, thing, 1);
|
||||
P_DamageMobj(tmthing, thing, thing, 1, 0);
|
||||
else if ((tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)
|
||||
&& !(thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield!
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1);
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1, 0);
|
||||
else if ((thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)
|
||||
&& !(tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield!
|
||||
P_DamageMobj(tmthing, thing, thing, 1);
|
||||
P_DamageMobj(tmthing, thing, thing, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1476,7 +1445,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
else
|
||||
{
|
||||
if (thing->flags2 & MF2_AMBUSH)
|
||||
P_DamageMobj(tmthing, thing, thing, 1);
|
||||
P_DamageMobj(tmthing, thing, thing, 1, 0);
|
||||
K_KartBouncing(tmthing, thing, false, true);
|
||||
}
|
||||
|
||||
|
|
@ -3179,10 +3148,10 @@ static boolean PTR_LineIsBlocking(line_t *li)
|
|||
if (!(slidemo->flags & MF_MISSILE))
|
||||
{
|
||||
if (li->flags & ML_IMPASSABLE)
|
||||
goto isblocking;
|
||||
return true;
|
||||
|
||||
if (slidemo->player && !slidemo->player->spectator && li->flags & ML_BLOCKPLAYERS)
|
||||
goto isblocking;
|
||||
return true;
|
||||
}
|
||||
|
||||
// set openrange, opentop, openbottom
|
||||
|
|
@ -3195,7 +3164,7 @@ static boolean PTR_LineIsBlocking(line_t *li)
|
|||
return true; // mobj is too high
|
||||
|
||||
if (openbottom - slidemo->z > FixedMul(MAXSTEPMOVE, mapobjectscale))
|
||||
goto isblocking; // too big a step up
|
||||
return true; // too big a step up
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -3345,7 +3314,7 @@ static void P_CheckLavaWall(mobj_t *mo, sector_t *sec)
|
|||
if (GETSECSPECIAL(rover->master->frontsector->special, 1) != 3)
|
||||
continue;
|
||||
|
||||
if (rover->master->flags & ML_BLOCKMONSTERS)
|
||||
if (rover->master->flags & ML_BLOCKPLAYERS)
|
||||
continue;
|
||||
|
||||
topheight = P_GetFFloorTopZAt(rover, mo->x, mo->y);
|
||||
|
|
|
|||
42
src/p_mobj.c
42
src/p_mobj.c
|
|
@ -2351,23 +2351,12 @@ boolean P_ZMovement(mobj_t *mo)
|
|||
|
||||
if (mo->flags2 & MF2_SKULLFLY) // the skull slammed into something
|
||||
mom.z = -mom.z;
|
||||
else
|
||||
// Flingrings bounce
|
||||
if (/*mo->type == MT_FLINGRING
|
||||
|| mo->type == MT_FLINGCOIN
|
||||
|| mo->type == MT_FLINGBLUESPHERE
|
||||
|| mo->type == MT_FLINGNIGHTSCHIP
|
||||
|| P_WeaponOrPanel(mo->type)
|
||||
|| mo->type == MT_FLINGEMERALD
|
||||
||*/ mo->type == MT_BIGTUMBLEWEED
|
||||
else if (mo->type == MT_BIGTUMBLEWEED
|
||||
|| mo->type == MT_LITTLETUMBLEWEED
|
||||
|| mo->type == MT_CANNONBALLDECOR
|
||||
|| mo->type == MT_FALLINGROCK)
|
||||
{
|
||||
if (maptol & TOL_NIGHTS)
|
||||
mom.z = -FixedDiv(mom.z, 10*FRACUNIT);
|
||||
else
|
||||
mom.z = -FixedMul(mom.z, FixedDiv(17*FRACUNIT,20*FRACUNIT));
|
||||
mom.z = -FixedMul(mom.z, FixedDiv(17*FRACUNIT,20*FRACUNIT));
|
||||
|
||||
if (mo->type == MT_BIGTUMBLEWEED || mo->type == MT_LITTLETUMBLEWEED)
|
||||
{
|
||||
|
|
@ -2502,10 +2491,7 @@ boolean P_ZMovement(mobj_t *mo)
|
|||
// Flags bounce
|
||||
if (mo->type == MT_REDFLAG || mo->type == MT_BLUEFLAG)
|
||||
{
|
||||
if (maptol & TOL_NIGHTS)
|
||||
mo->momz = -FixedDiv(mo->momz, 10*FRACUNIT);
|
||||
else
|
||||
mo->momz = -FixedMul(mo->momz, FixedDiv(17*FRACUNIT,20*FRACUNIT));
|
||||
mo->momz = -FixedMul(mo->momz, FixedDiv(17*FRACUNIT,20*FRACUNIT));
|
||||
}
|
||||
else
|
||||
mo->momz = 0;
|
||||
|
|
@ -12310,8 +12296,7 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
p->skincolor = skincolor_blueteam;
|
||||
}
|
||||
|
||||
if ((netgame || multiplayer) && ((gametyperules & GTR_SPAWNINVUL) || leveltime) && !p->spectator && !(maptol & TOL_NIGHTS))
|
||||
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
|
||||
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
|
||||
|
||||
mobj = P_SpawnMobj(0, 0, 0, MT_PLAYER);
|
||||
(mobj->player = p)->mo = mobj;
|
||||
|
|
@ -12354,23 +12339,6 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
P_SetScale(mobj, mobj->destscale);
|
||||
P_FlashPal(p, 0, 0); // Resets
|
||||
|
||||
if (!leveltime && !p->spectator && ((maptol & TOL_NIGHTS) == TOL_NIGHTS) != (G_IsSpecialStage(gamemap))) // non-special NiGHTS stage or special non-NiGHTS stage
|
||||
{
|
||||
if (maptol & TOL_NIGHTS)
|
||||
{
|
||||
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);
|
||||
idya->health = 0; // for identification
|
||||
P_SetTarget(&idya->target, mobj);
|
||||
P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate);
|
||||
P_SetTarget(&mobj->tracer, idya);
|
||||
}
|
||||
}
|
||||
else if (sstimer)
|
||||
p->nightstime = sstimer;
|
||||
}
|
||||
|
||||
if ((gametyperules & GTR_BUMPERS)) // SRB2kart
|
||||
{
|
||||
mobj_t *overheadarrow = P_SpawnMobj(mobj->x, mobj->y, mobj->z + mobj->height + 16*FRACUNIT, MT_PLAYERARROW);
|
||||
|
|
@ -14500,8 +14468,6 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 allowai
|
|||
P_SetTarget(&th->target, source);
|
||||
|
||||
speed = th->info->speed;
|
||||
if (source->player && source->player->charability == CA_FLY)
|
||||
speed = FixedMul(speed, 3*FRACUNIT/2);
|
||||
|
||||
th->angle = an;
|
||||
th->momx = FixedMul(speed, FINECOSINE(an>>ANGLETOFINESHIFT));
|
||||
|
|
|
|||
|
|
@ -1592,9 +1592,9 @@ static void ParseTextmapLinedefParameter(UINT32 i, char *param, char *val)
|
|||
|
||||
// Flags
|
||||
else if (fastcmp(param, "blocking") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_IMPASSIBLE;
|
||||
else if (fastcmp(param, "blockmonsters") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_BLOCKMONSTERS;
|
||||
lines[i].flags |= ML_IMPASSABLE;
|
||||
else if ((fastcmp(param, "blockplayers") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_BLOCKPLAYERS;
|
||||
else if (fastcmp(param, "twosided") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_TWOSIDED;
|
||||
else if (fastcmp(param, "dontpegtop") && fastcmp("true", val))
|
||||
|
|
|
|||
41
src/p_spec.c
41
src/p_spec.c
|
|
@ -1622,7 +1622,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
if (rings > dist)
|
||||
return false;
|
||||
}
|
||||
else if (triggerline->flags & ML_BLOCKMONSTERS)
|
||||
else if (triggerline->flags & ML_BLOCKPLAYERS)
|
||||
{
|
||||
if (rings < dist)
|
||||
return false;
|
||||
|
|
@ -1695,12 +1695,6 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
|
||||
switch (specialtype)
|
||||
{
|
||||
/*case 305: // continuous
|
||||
case 306: // each time
|
||||
case 307: // once
|
||||
if (!(actor && actor->player && actor->player->charability == dist/10))
|
||||
return false;
|
||||
break;*/
|
||||
case 309: // continuous
|
||||
case 310: // each time
|
||||
// Only red team members can activate this.
|
||||
|
|
@ -3284,7 +3278,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
{
|
||||
foundrover = true;
|
||||
|
||||
if (line->flags & ML_BLOCKMONSTERS) // FOF flags determine respawn ability instead?
|
||||
if (line->flags & ML_BLOCKPLAYERS) // FOF flags determine respawn ability instead?
|
||||
respawn = !(rover->flags & FF_NORETURN) ^ !!(line->flags & ML_NOCLIMB); // no climb inverts
|
||||
|
||||
EV_StartCrumble(rover->master->frontsector, rover, (rover->flags & FF_FLOATBOB), player, rover->alpha, respawn);
|
||||
|
|
@ -3373,7 +3367,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
INT32 viewid = sides[line->sidenum[0]].textureoffset>>FRACBITS;
|
||||
INT32 centerid = sides[line->sidenum[0]].rowoffset>>FRACBITS;
|
||||
|
||||
if ((line->flags & (ML_EFFECT4|ML_BLOCKMONSTERS)) == ML_EFFECT4) // Solid Midtexture is on but Block Enemies is off?
|
||||
if ((line->flags & (ML_EFFECT4|ML_BLOCKPLAYERS)) == ML_EFFECT4) // Solid Midtexture is on but Block Enemies is off?
|
||||
{
|
||||
CONS_Alert(CONS_WARNING,
|
||||
M_GetText("Skybox switch linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"),
|
||||
|
|
@ -3391,7 +3385,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
}
|
||||
|
||||
// set centerpoint mobj
|
||||
if (line->flags & ML_BLOCKMONSTERS) // Block Enemies turns ON centerpoint setting
|
||||
if (line->flags & ML_BLOCKPLAYERS) // Block Enemies turns ON centerpoint setting
|
||||
{
|
||||
if (centerid >= 0 && centerid < 16)
|
||||
skyboxmo[1] = skyboxcenterpnts[centerid];
|
||||
|
|
@ -3404,7 +3398,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
viewid,
|
||||
centerid,
|
||||
((line->flags & ML_EFFECT4) ? "no" : "yes"),
|
||||
((line->flags & ML_BLOCKMONSTERS) ? "yes" : "no"));
|
||||
((line->flags & ML_BLOCKPLAYERS) ? "yes" : "no"));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -3555,7 +3549,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
speed,
|
||||
(line->flags & ML_EFFECT4), // tic-based logic
|
||||
(line->flags & ML_EFFECT3), // Relative destvalue
|
||||
!(line->flags & ML_BLOCKMONSTERS), // do not handle FF_EXISTS
|
||||
!(line->flags & ML_BLOCKPLAYERS), // do not handle FF_EXISTS
|
||||
!(line->flags & ML_NOCLIMB), // do not handle FF_TRANSLUCENT
|
||||
!(line->flags & ML_EFFECT2), // do not handle lighting
|
||||
!(line->flags & ML_EFFECT2), // do not handle colormap (ran out of flags)
|
||||
|
|
@ -3580,7 +3574,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
max(1, min(256, (line->flags & ML_EFFECT3) ? rover->alpha + destvalue : destvalue)),
|
||||
0, // set alpha immediately
|
||||
false, NULL, // tic-based logic
|
||||
!(line->flags & ML_BLOCKMONSTERS), // do not handle FF_EXISTS
|
||||
!(line->flags & ML_BLOCKPLAYERS), // do not handle FF_EXISTS
|
||||
!(line->flags & ML_NOCLIMB), // do not handle FF_TRANSLUCENT
|
||||
!(line->flags & ML_EFFECT2), // do not handle lighting
|
||||
!(line->flags & ML_EFFECT2), // do not handle colormap (ran out of flags)
|
||||
|
|
@ -3626,7 +3620,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
foundrover = true;
|
||||
|
||||
P_ResetFakeFloorFader(rover, NULL,
|
||||
!(line->flags & ML_BLOCKMONSTERS)); // do not finalize collision flags
|
||||
!(line->flags & ML_BLOCKPLAYERS)); // do not finalize collision flags
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3787,7 +3781,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
INT32 pagenum = max(0, (sides[line->sidenum[0]].rowoffset>>FRACBITS)-1);
|
||||
INT32 postexectag = abs((line->sidenum[1] != 0xFFFF) ? sides[line->sidenum[1]].textureoffset>>FRACBITS : line->tag);
|
||||
|
||||
boolean closetextprompt = (line->flags & ML_BLOCKMONSTERS);
|
||||
boolean closetextprompt = (line->flags & ML_BLOCKPLAYERS);
|
||||
//boolean allplayers = (line->flags & ML_NOCLIMB);
|
||||
boolean runpostexec = (line->flags & ML_EFFECT1);
|
||||
boolean blockcontrols = !(line->flags & ML_EFFECT2);
|
||||
|
|
@ -5200,16 +5194,8 @@ static void P_RunSpecialSectorCheck(player_t *player, sector_t *sector)
|
|||
// Check Section 4
|
||||
switch(GETSECSPECIAL(sector->special, 4))
|
||||
{
|
||||
case 2: // Level Exit / GOAL Sector / Flag Return
|
||||
if (!(maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap))
|
||||
{
|
||||
// Special stage GOAL sector
|
||||
// requires touching floor.
|
||||
break;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
|
||||
case 1: // Starpost activator
|
||||
case 2: // Level Exit / GOAL Sector / Flag Return
|
||||
case 5: // Fan sector
|
||||
case 6: // Super Sonic Transform
|
||||
case 8: // Zoom Tube Start
|
||||
|
|
@ -6681,7 +6667,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
ffloorflags |= FF_NOSHADE;
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
|
||||
P_AddRaiseThinker(lines[i].frontsector, lines[i].tag, speed, ceilingtop, ceilingbottom, !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
|
||||
P_AddRaiseThinker(lines[i].frontsector, lines[i].tag, speed, ceilingtop, ceilingbottom, !!(lines[i].flags & ML_BLOCKPLAYERS), !!(lines[i].flags & ML_NOCLIMB));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -6804,11 +6790,6 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
case 303:
|
||||
case 304:
|
||||
|
||||
// Charability linedef executors
|
||||
case 305:
|
||||
case 307:
|
||||
break;
|
||||
|
||||
case 308: // Race-only linedef executor. Triggers once.
|
||||
if (!(gametyperules & GTR_CIRCUIT))
|
||||
lines[i].special = 0;
|
||||
|
|
|
|||
|
|
@ -569,12 +569,6 @@ void P_Ticker(boolean run)
|
|||
if (!demo.playback) // Don't increment if a demo is playing.
|
||||
totalplaytime++;
|
||||
|
||||
/*if (!(maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap))
|
||||
P_DoSpecialStageStuff();
|
||||
|
||||
if (runemeraldmanager)
|
||||
P_EmeraldManager(); // Power stone mode*/
|
||||
|
||||
// formality so kitemcap gets updated properly each frame.
|
||||
P_RunKartItems();
|
||||
|
||||
|
|
|
|||
148
src/p_user.c
148
src/p_user.c
|
|
@ -1506,15 +1506,6 @@ static void P_CheckBustableBlocks(player_t *player)
|
|||
|| (player->pflags & PF_JUMPED && !(player->pflags & PF_NOJUMPDAMAGE))))
|
||||
goto bust;
|
||||
|
||||
// You can always break it if you have CA_GLIDEANDCLIMB
|
||||
// or if you are bouncing on it
|
||||
// or you are using CA_TWINSPIN/CA2_MELEE.
|
||||
if (player->charability == CA_GLIDEANDCLIMB
|
||||
|| (player->pflags & PF_BOUNCING)
|
||||
|| ((player->charability == CA_TWINSPIN) && (player->panim == PA_ABILITY))
|
||||
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2))
|
||||
goto bust;
|
||||
|
||||
if (rover->flags & FF_STRONGBUST)
|
||||
continue;
|
||||
|
||||
|
|
@ -1534,13 +1525,6 @@ static void P_CheckBustableBlocks(player_t *player)
|
|||
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||
|
||||
if (((player->charability == CA_TWINSPIN) && (player->panim == PA_ABILITY))
|
||||
|| ((P_MobjFlip(player->mo)*player->mo->momz < 0) && (player->pflags & PF_BOUNCING || ((player->charability2 == CA2_MELEE) && (player->panim == PA_ABILITY2)))))
|
||||
{
|
||||
topheight -= player->mo->momz;
|
||||
bottomheight -= player->mo->momz;
|
||||
}
|
||||
|
||||
// Height checks
|
||||
if (rover->flags & FF_SHATTERBOTTOM)
|
||||
{
|
||||
|
|
@ -3074,10 +3058,7 @@ void P_ResetCamera(player_t *player, camera_t *thiscam)
|
|||
thiscam->y = y;
|
||||
thiscam->z = z;
|
||||
|
||||
if (!(thiscam == &camera[0] && (cv_cam_still[0].value)
|
||||
&& !(thiscam == &camera[1] && cv_cam_still[1].value)
|
||||
&& !(thiscam == &camera[2] && cv_cam_still[2].value)
|
||||
&& !(thiscam == &camera[3] && cv_cam_still[3].value))
|
||||
if (!cv_cam_still[num].value)
|
||||
{
|
||||
thiscam->angle = player->mo->angle;
|
||||
thiscam->aiming = 0;
|
||||
|
|
@ -3130,6 +3111,23 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
return true;
|
||||
}
|
||||
|
||||
if (thiscam == &camera[1]) // Camera 2
|
||||
{
|
||||
num = 1;
|
||||
}
|
||||
else if (thiscam == &camera[2]) // Camera 3
|
||||
{
|
||||
num = 2;
|
||||
}
|
||||
else if (thiscam == &camera[3]) // Camera 4
|
||||
{
|
||||
num = 3;
|
||||
}
|
||||
else // Camera 1
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
|
||||
mo = player->mo;
|
||||
|
||||
#ifndef NOCLIPCAM
|
||||
|
|
@ -3148,42 +3146,14 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
if (player->spectator) // force cam off for spectators
|
||||
return true;
|
||||
|
||||
if (!cv_chasecam.value && thiscam == &camera[0])
|
||||
return true;
|
||||
|
||||
if (!cv_chasecam2.value && thiscam == &camera[1])
|
||||
return true;
|
||||
|
||||
if (!cv_chasecam3.value && thiscam == &camera[2])
|
||||
return true;
|
||||
|
||||
if (!cv_chasecam4.value && thiscam == &camera[3])
|
||||
if (!cv_chasecam[num].value && thiscam == &camera[num])
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!thiscam->chase && !resetcalled)
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
focusangle = localangle[0];
|
||||
else if (player == &players[displayplayers[1]])
|
||||
focusangle = localangle[1];
|
||||
else if (player == &players[displayplayers[2]])
|
||||
focusangle = localangle[2];
|
||||
else if (player == &players[displayplayers[3]])
|
||||
focusangle = localangle[3];
|
||||
else
|
||||
focusangle = mo->angle;
|
||||
|
||||
if (thiscam == &camera[0])
|
||||
camrotate = cv_cam_rotate.value;
|
||||
else if (thiscam == &camera[1])
|
||||
camrotate = cv_cam2_rotate.value;
|
||||
else if (thiscam == &camera[2])
|
||||
camrotate = cv_cam3_rotate.value;
|
||||
else if (thiscam == &camera[3])
|
||||
camrotate = cv_cam4_rotate.value;
|
||||
else
|
||||
camrotate = 0;
|
||||
focusangle = localangle[num];
|
||||
camrotate = cv_cam_rotate[num].value;
|
||||
|
||||
if (leveltime < introtime) // Whoooshy camera!
|
||||
{
|
||||
|
|
@ -3209,35 +3179,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
focusangle = mo->angle;
|
||||
focusaiming = 0;
|
||||
}
|
||||
else if (sign)
|
||||
{
|
||||
focusangle = FixedAngle(sign->spawnpoint->angle << FRACBITS) + ANGLE_180;
|
||||
focusaiming = 0;
|
||||
}
|
||||
else if (player == &players[consoleplayer])
|
||||
{
|
||||
focusangle = localangle[0];
|
||||
focusaiming = localaiming[0];
|
||||
}
|
||||
else if (player == &players[g_localplayers[1]])
|
||||
{
|
||||
focusangle = localangle[1];
|
||||
focusaiming = localaiming[1];
|
||||
}
|
||||
else if (player == &players[g_localplayers[2]])
|
||||
{
|
||||
focusangle = localangle[2];
|
||||
focusaiming = localaiming[2];
|
||||
}
|
||||
else if (player == &players[g_localplayers[3]])
|
||||
{
|
||||
focusangle = localangle[3];
|
||||
focusaiming = localaiming[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
focusangle = player->cmd.angleturn << 16;
|
||||
focusaiming = player->aiming;
|
||||
focusangle = localangle[num];
|
||||
focusaiming = localaiming[num];
|
||||
}
|
||||
|
||||
if (P_CameraThinker(player, thiscam, resetcalled))
|
||||
|
|
@ -3245,43 +3190,11 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
|
||||
lookback = ( player->cmd.buttons & BT_LOOKBACK );
|
||||
|
||||
if (thiscam == &camera[1]) // Camera 2
|
||||
{
|
||||
num = 1;
|
||||
camspeed = cv_cam2_speed.value;
|
||||
camstill = cv_cam2_still.value;
|
||||
camrotate = cv_cam2_rotate.value;
|
||||
camdist = FixedMul(cv_cam2_dist.value, mapobjectscale);
|
||||
camheight = FixedMul(cv_cam2_height.value, mapobjectscale);
|
||||
}
|
||||
else if (thiscam == &camera[2]) // Camera 3
|
||||
{
|
||||
num = 2;
|
||||
camspeed = cv_cam3_speed.value;
|
||||
camstill = cv_cam3_still.value;
|
||||
camrotate = cv_cam3_rotate.value;
|
||||
camdist = FixedMul(cv_cam3_dist.value, mapobjectscale);
|
||||
camheight = FixedMul(cv_cam3_height.value, mapobjectscale);
|
||||
}
|
||||
else if (thiscam == &camera[3]) // Camera 4
|
||||
{
|
||||
num = 3;
|
||||
camspeed = cv_cam4_speed.value;
|
||||
camstill = cv_cam4_still.value;
|
||||
camrotate = cv_cam4_rotate.value;
|
||||
camdist = FixedMul(cv_cam4_dist.value, mapobjectscale);
|
||||
camheight = FixedMul(cv_cam4_height.value, mapobjectscale);
|
||||
}
|
||||
else // Camera 1
|
||||
{
|
||||
num = 0;
|
||||
camspeed = cv_cam_speed.value;
|
||||
camstill = cv_cam_still.value;
|
||||
camorbit = cv_cam_orbit.value;
|
||||
camrotate = cv_cam_rotate.value;
|
||||
camdist = FixedMul(cv_cam_dist.value, mapobjectscale);
|
||||
camheight = FixedMul(cv_cam_height.value, mapobjectscale);
|
||||
}
|
||||
camspeed = cv_cam_speed[num].value;
|
||||
camstill = cv_cam_still[num].value;
|
||||
camrotate = cv_cam_rotate[num].value;
|
||||
camdist = FixedMul(cv_cam_dist[num].value, mapobjectscale);
|
||||
camheight = FixedMul(cv_cam_height[num].value, mapobjectscale);
|
||||
|
||||
if (timeover)
|
||||
{
|
||||
|
|
@ -3345,10 +3258,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
}
|
||||
|
||||
if (!resetcalled && (leveltime >= introtime && timeover != 2)
|
||||
&& ((thiscam == &camera[0] && t_cam_rotate[0] != -42)
|
||||
|| (thiscam == &camera[1] && t_cam_rotate[1] != -42)
|
||||
|| (thiscam == &camera[2] && t_cam_rotate[2] != -42)
|
||||
|| (thiscam == &camera[3] && t_cam_rotate[3] != -42)))
|
||||
&& (t_cam_rotate[num] != -42))
|
||||
{
|
||||
angle = FixedAngle(camrotate*FRACUNIT);
|
||||
thiscam->angle = angle;
|
||||
|
|
|
|||
|
|
@ -75,18 +75,8 @@ UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
|
|||
switch(spr2)
|
||||
{
|
||||
// Normal special cases.
|
||||
case SPR2_JUMP:
|
||||
spr2 = ((player
|
||||
? player->charflags
|
||||
: skin->flags)
|
||||
& SF_NOJUMPSPIN) ? SPR2_SPNG : SPR2_ROLL;
|
||||
break;
|
||||
case SPR2_TIRE:
|
||||
spr2 = ((player
|
||||
? player->charability
|
||||
: skin->ability)
|
||||
== CA_SWIM) ? SPR2_SWIM : SPR2_FLY;
|
||||
break;
|
||||
// (none in kart)
|
||||
|
||||
// Use the handy list, that's what it's there for!
|
||||
default:
|
||||
spr2 = spr2defaults[spr2];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue