Fix warnings

Possibly fix some whitespace problems
This commit is contained in:
Sean Ryder 2017-03-04 22:13:19 +00:00
parent 592c4482a9
commit be3acfff0b
14 changed files with 128 additions and 116 deletions

View File

@ -19,7 +19,7 @@
#define __D_NET__
// Max computers in a game
#define MAXNETNODES 32
#define MAXNETNODES 16
#define BROADCASTADDR MAXNETNODES
#define MAXSPLITSCREENPLAYERS 2 // Max number of players on a single computer

View File

@ -298,7 +298,7 @@ typedef enum
// 0x4 = 3 Green Shells orbiting, 0x8 = Triple Green Shell in inventory
k_bobomb, // 0x1 = Bob-omb being held, 0x2 = Bob-omb in inventory
k_blueshell, // 0x1 = Blue Shell in inventory
k_jaws, // 0x1 = 1 Jaws orbiting, 0x2 = 2 Jaws orbiting,
k_jaws, // 0x1 = 1 Jaws orbiting, 0x2 = 2 Jaws orbiting,
// 0x4 = 2x Jaws in inventory
k_fireflower, // 0x1 = Fire Flower in inventory
k_tripleredshell, // 0x1 = 1 Red Shell orbiting, 0x2 = 2 Red Shells orbiting

View File

@ -401,7 +401,7 @@ extern UINT16 extralifetics;
// SRB2kart
extern INT32 bootime;
extern INT32 mushroomtime;
extern INT32 bonustime;
extern INT32 itemtime;
extern UINT8 introtoplay;
extern UINT8 creditscutscene;

View File

@ -199,7 +199,7 @@ UINT16 extralifetics = 4*TICRATE;
// SRB2kart
INT32 bootime = 7*TICRATE;
INT32 mushroomtime = TICRATE + (TICRATE/3);
INT32 bonustime = 8*TICRATE;
INT32 itemtime = 8*TICRATE;
INT32 gameovertics = 15*TICRATE;
@ -1269,8 +1269,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
//cmd->angleturn = FixedMul(cmd->angleturn, FixedDiv(80 - (players[consoleplayer].speed >> 16), 80));
//if (players[consoleplayer].kartstuff[k_startimer]
// || players[consoleplayer].kartstuff[k_mushroomtimer]
//if (players[consoleplayer].kartstuff[k_startimer]
// || players[consoleplayer].kartstuff[k_mushroomtimer]
// || players[consoleplayer].kartstuff[k_growshrinktimer] > 0)
// cmd->angleturn = FixedMul(cmd->angleturn, FixedDiv(5*FRACUNIT, 4*FRACUNIT));
@ -2016,15 +2016,15 @@ void G_Ticker(boolean run)
if (playeringame[i])
G_CopyTiccmd(cmd, &netcmds[buf][i], 1);
// SRB2kart
// Save the dir the player is holding
// to allow items to be thrown forward or backward.
if (cmd->buttons & BT_FORWARD)
players[i].kartstuff[k_throwdir] = 1;
else if (cmd->buttons & BT_BACKWARD)
players[i].kartstuff[k_throwdir] = -1;
else
players[i].kartstuff[k_throwdir] = 0;
// SRB2kart
// Save the dir the player is holding
// to allow items to be thrown forward or backward.
if (cmd->buttons & BT_FORWARD)
players[i].kartstuff[k_throwdir] = 1;
else if (cmd->buttons & BT_BACKWARD)
players[i].kartstuff[k_throwdir] = -1;
else
players[i].kartstuff[k_throwdir] = 0;
}
// do main actions

View File

@ -17,6 +17,7 @@
#include "v_video.h"
#include "z_zone.h"
#include "m_misc.h"
#include "k_kart.h"
//{ SRB2kart Color Code
@ -778,6 +779,11 @@ static void K_KartSetItemResult(fixed_t position, fixed_t giveitem)
*/
static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
{
INT32 i;
INT32 roulettestop = (TICRATE*1) + (3*(pingame - player->kartstuff[k_position]));
fixed_t prandom = P_RandomFixed();
fixed_t ppos = player->kartstuff[k_position] - 1;
// This makes the roulette cycle through items - if this is 0, you shouldn't be here.
if (player->kartstuff[k_itemroulette])
player->kartstuff[k_itemroulette]++;
@ -792,8 +798,6 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
basechance = chance = prevchance = 0;
numchoices = pingame = pexiting = 0;
INT32 i;
// Initializes existing spawnchance values
for (i = 0; i < (NUMKARTITEMS * NUMKARTODDS); i++)
spawnchance[i] = 0;
@ -807,12 +811,10 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
pexiting++;
}
INT32 roulettestop = (TICRATE*1) + (3*(pingame - player->kartstuff[k_position]));
// If the roulette finishes or the player presses BT_ATTACK, stop the roulette and calculate the item.
// I'm returning via the exact opposite, however, to forgo having another bracket embed. Same result either way, I think.
// Finally, if you get past this check, now you can actually start calculating what item you get.
if (!(player->kartstuff[k_itemroulette] >= (TICRATE*3)
if (!(player->kartstuff[k_itemroulette] >= (TICRATE*3)
|| ((cmd->buttons & BT_ATTACK) && player->kartstuff[k_itemroulette] >= roulettestop)))
return;
@ -821,10 +823,6 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
player->kartstuff[k_itemclose] = 0; // Reset the item window closer.
// Yes I know I'm defining variables half-way into the function, but they aren't needed until now :/
fixed_t prandom = P_RandomFixed();
fixed_t ppos = player->kartstuff[k_position] - 1;
// Tiny catcher in case player position is unset.
if (ppos < 0) ppos = 0;
@ -903,7 +901,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
\return void
*/
void K_UpdateOffroad(player_t *player)
static void K_UpdateOffroad(player_t *player)
{
fixed_t kartweight = player->kartweight;
fixed_t offroad;
@ -911,13 +909,13 @@ void K_UpdateOffroad(player_t *player)
player->mo->x + player->mo->momx*2, player->mo->y + player->mo->momy*2)->sector;
// If you are offroad, a timer starts. Depending on your weight value, the timer increments differently.
if (nextsector->special & 256 && nextsector->special != 768 && (nextsector->special != 1024 || nextsector->special != 4864))
if ((nextsector->special & 256) && nextsector->special != 768 && nextsector->special != 1024 && nextsector->special != 4864)
{
if (P_IsObjectOnGround(player->mo) && player->kartstuff[k_offroad] == 0)
player->kartstuff[k_offroad] = 16;
if (player->kartstuff[k_offroad] > 0)
{
if (kartweight < 1) kartweight = 1; if (kartweight > 9) kartweight = 9; // Safety Net
if (kartweight < 1) { kartweight = 1; } if (kartweight > 9) { kartweight = 9; } // Safety Net
// 1872 is the magic number - 35 frames adds up to approximately 65536. 1872/4 = 468/3 = 156
// A higher kart weight means you can stay offroad for longer without losing speed
@ -1037,7 +1035,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
K_KartItemRoulette(player, cmd); // Roulette Code
// Stopping of the horrible star SFX
if (player->mo->health <= 0 || player->mo->player->kartstuff[k_startimer] <= 0
if (player->mo->health <= 0 || player->mo->player->kartstuff[k_startimer] <= 0
|| player->mo->player->kartstuff[k_growshrinktimer] > 0) // If you don't have invincibility (or mega is active too)
{
if (S_SoundPlaying(player->mo, sfx_star)) // But the sound is playing
@ -1052,7 +1050,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
}
}
void K_PlayTauntSound(mobj_t *source)
static void K_PlayTauntSound(mobj_t *source)
{
switch (P_RandomFixed() % 4)
{
@ -1071,7 +1069,7 @@ void K_PlayTauntSound(mobj_t *source)
}
}
fixed_t K_GetKartBoostPower(player_t *player, boolean speedonly)
static fixed_t K_GetKartBoostPower(player_t *player, boolean speedonly)
{
fixed_t boostpower = FRACUNIT;
fixed_t boostvalue = 0;
@ -1088,13 +1086,13 @@ fixed_t K_GetKartBoostPower(player_t *player, boolean speedonly)
numboosts++;
}
if (player->kartstuff[k_growshrinktimer] > 1
&& (player->kartstuff[k_growshrinktimer] > (bonustime - 25)
&& (player->kartstuff[k_growshrinktimer] > (itemtime - 25)
|| player->kartstuff[k_growshrinktimer] <= 26) && speedonly)
{ // Mega Mushroom - Mid-size
boostvalue += 9; // 9/8 speed (*1.125)
numboosts++;
}
if (player->kartstuff[k_growshrinktimer] < (bonustime - 25)
if (player->kartstuff[k_growshrinktimer] < (itemtime - 25)
&& player->kartstuff[k_growshrinktimer] > 26 && speedonly)
{ // Mega Mushroom
boostvalue += 10; // 10/8 speed (*1.250)
@ -1130,6 +1128,7 @@ fixed_t K_GetKartBoostPower(player_t *player, boolean speedonly)
return boostpower;
}
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
{
fixed_t k_speed = 151;
@ -1155,7 +1154,8 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
return FixedMul(FixedMul(k_speed<<14, g_cc), K_GetKartBoostPower(player, true));
return FixedMul(k_speed<<14, g_cc);
}
fixed_t K_GetKartAccel(player_t *player)
static fixed_t K_GetKartAccel(player_t *player)
{
fixed_t k_accel = 36;
@ -1163,15 +1163,16 @@ fixed_t K_GetKartAccel(player_t *player)
return FixedMul(k_accel, K_GetKartBoostPower(player, false));
}
fixed_t K_3dKartMovement(player_t *player, boolean onground, boolean forwardmovement)
{
if (!onground) return 0; // If the player isn't on the ground, there is no change in speed
fixed_t accelmax = 4000;
fixed_t newspeed, oldspeed, finalspeed;
fixed_t p_speed = K_GetKartSpeed(player, true);
fixed_t p_accel = K_GetKartAccel(player);
if (!onground) return 0; // If the player isn't on the ground, there is no change in speed
// ACCELCODE!!!1!11!
oldspeed = P_AproxDistance(player->rmomx, player->rmomy); // FixedMul(P_AproxDistance(player->rmomx, player->rmomy), player->mo->scale);
newspeed = FixedDiv(FixedDiv(FixedMul(oldspeed, accelmax - p_accel) + FixedMul(p_speed, p_accel), accelmax), ORIG_FRICTION);
@ -1187,6 +1188,7 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, boolean forwardmove
void K_SpinPlayer(player_t *player, mobj_t *source)
{
(void) source;
if (player->health <= 0)
return;
@ -1226,6 +1228,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
void K_SquishPlayer(player_t *player, mobj_t *source)
{
(void) source;
if (player->health <= 0)
return;
@ -1252,6 +1255,7 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we just throw the player up higher here and extend their spinout timer
{
(void) source;
if (player->health <= 0)
return;
@ -1364,7 +1368,7 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32
}
}
mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t angle, INT32 flags2, fixed_t speed)
static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t angle, INT32 flags2, fixed_t speed)
{
mobj_t *th;
angle_t an;
@ -1540,12 +1544,11 @@ static mobj_t *P_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
if (mo)
{
angle_t fa = player->mo->angle>>ANGLETOFINESHIFT;
int DIST = 50*FRACUNIT + player->speed*FRACUNIT; // 6 when dropping CTF flag
INT32 DIST = 50*FRACUNIT + player->speed*FRACUNIT; // 6 when dropping CTF flag
INT32 HEIGHT;
if (DIST > 64*FRACUNIT)
DIST = 64*FRACUNIT;
int HEIGHT;
if (dir == 2)
HEIGHT = 16*FRACUNIT + player->mo->momz;
else
@ -1745,7 +1748,7 @@ void K_DoMushroom(player_t *player, boolean doPFlag)
player->kartstuff[k_sounds] = 50;
}
void K_DoLightning(player_t *player, boolean bluelightning)
static void K_DoLightning(player_t *player, boolean bluelightning)
{
mobj_t *mo;
thinker_t *think;
@ -1783,10 +1786,9 @@ fixed_t K_GetKartTurnValue(player_t *player, ticcmd_t *cmd)
{
fixed_t p_angle = cmd->angleturn;
fixed_t p_maxspeed = K_GetKartSpeed(player, false);
fixed_t adjustangle = FixedDiv((p_maxspeed>>16) - (player->speed>>16), (p_maxspeed>>16) + player->kartweight);
p_maxspeed = FixedMul(p_maxspeed, 3*FRACUNIT);
fixed_t adjustangle = FixedDiv((p_maxspeed>>16) - (player->speed>>16), (p_maxspeed>>16) + player->kartweight);
p_angle = FixedMul(p_angle, adjustangle); // Weight has a small effect on turning
@ -1811,7 +1813,7 @@ fixed_t K_GetKartTurnValue(player_t *player, ticcmd_t *cmd)
return p_angle;
}
fixed_t K_GetKartDriftValue(player_t *player, fixed_t turntype)
static fixed_t K_GetKartDriftValue(player_t *player, fixed_t turntype)
{
fixed_t driftangle = FRACUNIT;
fixed_t p_angle = player->kartstuff[k_driftangle];
@ -1836,11 +1838,11 @@ fixed_t K_GetKartDriftValue(player_t *player, fixed_t turntype)
return driftangle;
}
void K_KartDrift(player_t *player, ticcmd_t *cmd, boolean onground)
static void K_KartDrift(player_t *player, ticcmd_t *cmd, boolean onground)
{
fixed_t dsone = 26 + player->kartspeed;
fixed_t dstwo = 52 + player->kartspeed*2;
// Drifting is actually straffing + automatic turning.
// Holding the Jump button will enable drifting.
if (cmd->buttons & BT_DRIFTRIGHT)
@ -2057,21 +2059,21 @@ static void K_KartUpdatePosition(player_t *player)
player->kartstuff[k_position] = position;
}
boolean K_CheckForHoldItem(player_t *player)
static boolean K_CheckForHoldItem(player_t *player)
{
if ( player->kartstuff[k_greenshell] == 1
if ( player->kartstuff[k_greenshell] == 1
|| player->kartstuff[k_redshell] == 1
|| player->kartstuff[k_banana] == 1
|| player->kartstuff[k_fakeitem] == 1
|| player->kartstuff[k_banana] == 1
|| player->kartstuff[k_fakeitem] == 1
|| player->kartstuff[k_bobomb] == 1
|| player->kartstuff[k_triplegreenshell] & 1
|| player->kartstuff[k_triplegreenshell] & 2
|| player->kartstuff[k_triplegreenshell] & 1
|| player->kartstuff[k_triplegreenshell] & 2
|| player->kartstuff[k_triplegreenshell] & 4
|| player->kartstuff[k_tripleredshell] & 1
|| player->kartstuff[k_tripleredshell] & 2
|| player->kartstuff[k_tripleredshell] & 1
|| player->kartstuff[k_tripleredshell] & 2
|| player->kartstuff[k_tripleredshell] & 4
|| player->kartstuff[k_triplebanana] & 1
|| player->kartstuff[k_triplebanana] & 2
|| player->kartstuff[k_triplebanana] & 1
|| player->kartstuff[k_triplebanana] & 2
|| player->kartstuff[k_triplebanana] & 4
) return true;
return false;
@ -2139,11 +2141,11 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
// Lightning
// GoldenMushroom power
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && player->kartstuff[k_goldshroom] == 1
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && player->kartstuff[k_goldshroom] == 1
&& player->kartstuff[k_goldshroomtimer] == 0 && NO_BOO)
{
K_DoMushroom(player, true);
player->kartstuff[k_goldshroomtimer] = bonustime;
player->kartstuff[k_goldshroomtimer] = itemtime;
player->kartstuff[k_goldshroom] = 0;
}
// GoldenMushroom power
@ -2179,7 +2181,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
S_ChangeMusicInternal("minvnc", true);
if (!P_IsLocalPlayer(player))
S_StartSound(player->mo, sfx_star);
player->kartstuff[k_startimer] = bonustime; // Activate it
player->kartstuff[k_startimer] = itemtime; // Activate it
K_PlayTauntSound(player->mo);
player->kartstuff[k_star] = 0;
player->kartstuff[k_itemclose] = 10;
@ -2483,7 +2485,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
if (!P_IsLocalPlayer(player))
S_StartSound(player->mo, sfx_mega);
K_PlayTauntSound(player->mo);
player->kartstuff[k_growshrinktimer] = bonustime;
player->kartstuff[k_growshrinktimer] = itemtime;
S_StartSound(player->mo, sfx_mario3);
player->pflags |= PF_ATTACKDOWN;
player->kartstuff[k_megashroom] = 0;
@ -2514,7 +2516,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
player->kartstuff[k_boosting] = 0;
// Megashroom - Make the player grow!
if (player->kartstuff[k_growshrinktimer] > (bonustime - 25))
if (player->kartstuff[k_growshrinktimer] > (itemtime - 25))
{
if (leveltime & 2)
player->mo->destscale = FRACUNIT*3/2;
@ -2522,7 +2524,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
player->mo->destscale = FRACUNIT;
}
else if (player->kartstuff[k_growshrinktimer] > 26
&& player->kartstuff[k_growshrinktimer] <= (bonustime - 25))
&& player->kartstuff[k_growshrinktimer] <= (itemtime - 25))
player->mo->destscale = FRACUNIT*3/2;
// Megashroom - Back to normal...
else if (player->kartstuff[k_growshrinktimer] > 1
@ -3457,7 +3459,7 @@ static void K_DrawKartPositionFaces(void)
boolean completed[MAXPLAYERS];
INT32 rankplayer[MAXPLAYERS];
INT32 rankcolor[MAXPLAYERS];
UINT32 myplayer;
INT32 myplayer;
UINT8 *colormap;
patch_t *localpatch = kp_facenull;

View File

@ -3613,7 +3613,7 @@ void A_AttractChase(mobj_t *actor)
// Turn flingrings back into regular rings if attracted.
if (actor->tracer && actor->tracer->player
&& actor->tracer->player->kartstuff[k_magnettimer] //&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT
&& actor->tracer->player->kartstuff[k_magnettimer] //&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT
&& actor->info->reactiontime && actor->type != (mobjtype_t)actor->info->reactiontime)
{
mobj_t *newring;
@ -3877,10 +3877,10 @@ void A_ThrownRing(mobj_t *actor)
if (gametype == GT_CTF
&& actor->target->player->ctfteam == player->ctfteam)
continue;
if (actor->target->player->kartstuff[k_position] < player->kartstuff[k_position]) // SRB2kart - Red Shells only go after people ahead of you
continue;
}
dist = P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
@ -3899,7 +3899,7 @@ void A_ThrownRing(mobj_t *actor)
if (!P_CheckSight(actor, player->mo))
continue; // out of sight
if (dist < FixedMul(2048*FRACUNIT, player->mo->scale)) // SRB2kart // (player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT &&
if (dist < FixedMul(2048*FRACUNIT, player->mo->scale)) // SRB2kart // (player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT &&
P_SetTarget(&actor->tracer, player->mo);
return;
}
@ -8133,7 +8133,7 @@ void A_ItemPop(mobj_t *actor)
|| actor->target->player->kartstuff[k_itemroulette]
|| actor->target->player->kartstuff[k_boo] || actor->target->player->kartstuff[k_bootaketimer]
|| actor->target->player->kartstuff[k_boostolentimer]
|| actor->target->player->kartstuff[k_growshrinktimer] > 1
|| actor->target->player->kartstuff[k_growshrinktimer] > 1
|| actor->target->player->kartstuff[k_goldshroomtimer]))
actor->target->player->kartstuff[k_itemroulette] = 1;
else if(cv_debug && !(actor->target && actor->target->player))
@ -8243,7 +8243,6 @@ void A_RedShellChase(mobj_t *actor)
void A_BobombExplode(mobj_t *actor)
{
mobj_t *mo2;
mobj_t *mo3;
thinker_t *th;
INT32 d;
INT32 locvar1 = var1;
@ -8254,7 +8253,7 @@ void A_BobombExplode(mobj_t *actor)
for (d = 0; d < 16; d++)
K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), false, false); // 32 <-> 64
mo3 = P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOMBEXPLOSIONSOUND);
P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOMBEXPLOSIONSOUND);
//S_StartSound(actor, sfx_prloop);

View File

@ -1824,7 +1824,7 @@ void T_ThwompSector(levelspecthink_t *thwomp)
// I could of used rowoffset, but the FOF actually
// modifies the textures's Y offset. It doesn't with
// textureoffset, so Effect 4 can be ignored as usual.
if (thwomp->sourceline->flags & ML_EFFECT1
if (thwomp->sourceline->flags & ML_EFFECT1
&& leveltime < (unsigned)(sides[thwomp->sourceline->sidenum[0]].textureoffset>>FRACBITS))
thwomp->direction = 0;

View File

@ -1395,12 +1395,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
&& !(thing->z + thing->height < tmthing->z || thing->z > tmthing->z + tmthing->height))
{
// SRB2kart - Squish!
if ((tmthing->player->kartstuff[k_growshrinktimer] > 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)
if ((tmthing->player->kartstuff[k_growshrinktimer] > 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)
|| (tmthing->player->kartstuff[k_growshrinktimer] == 0 && thing->player->kartstuff[k_growshrinktimer] < 0))
{
K_SquishPlayer(thing->player, tmthing);
}
else if ((thing->player->kartstuff[k_growshrinktimer] > 0 && tmthing->player->kartstuff[k_growshrinktimer] <= 0)
else if ((thing->player->kartstuff[k_growshrinktimer] > 0 && tmthing->player->kartstuff[k_growshrinktimer] <= 0)
|| (thing->player->kartstuff[k_growshrinktimer] == 0 && tmthing->player->kartstuff[k_growshrinktimer] < 0))
{
K_SquishPlayer(tmthing->player, thing);
@ -3925,8 +3925,10 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush)
killer = P_SpawnMobj(thing->x, thing->y, thing->z, MT_NULL);
killer->threshold = 44; // Special flag for crushing
}
//P_DamageMobj(thing, killer, killer, 10000);
K_SquishPlayer(thing, killer); // SRB2kart - Squish instead of kill
if (thing->player)
P_DamageMobj(thing, killer, killer, 10000);
else
K_SquishPlayer(thing->player, killer); // SRB2kart - Squish instead of kill
}
}
}

View File

@ -5921,7 +5921,7 @@ void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on y
fixed_t tx = dest->x;
fixed_t ty = dest->y;
fixed_t tz = dest->z + (dest->height/2); // Aim for center
if (source->type == MT_RANDOMITEM || source->type == MT_FLINGRANDOMITEM) // SRB2kart - item boxes are sorta tall
tz = dest->z;
@ -6486,19 +6486,19 @@ void P_MobjThinker(mobj_t *mobj)
case MT_TRIPLEBANANASHIELD1:
case MT_TRIPLEBANANASHIELD2:
case MT_TRIPLEBANANASHIELD3:
if (mobj->health > 0 && mobj->target && mobj->target->player && mobj->target->player->mo
if (mobj->health > 0 && mobj->target && mobj->target->player && mobj->target->player->mo
&& mobj->target->player->health > 0 && !mobj->target->player->spectator)
{
INT32 zfixds = 56;
INT32 DIST = FixedMul(zfixds, mobj->target->scale);
INT32 HEIGHT;
const fixed_t radius = DIST*FRACUNIT; // mobj's distance from its Target, or Radius.
if (mobj->type == MT_BANANASHIELD || mobj->type == MT_TRIPLEBANANASHIELD1 || mobj->type == MT_TRIPLEBANANASHIELD2 || mobj->type == MT_TRIPLEBANANASHIELD3)
zfixds = 64;
else
zfixds = 56;
INT32 DIST = FixedMul(zfixds, mobj->target->scale);
INT32 HEIGHT;
const fixed_t radius = DIST*FRACUNIT; // mobj's distance from its Target, or Radius.
//mobj->angle += FixedAngle(12*FRACUNIT); // mobj's actual speed.
if (mobj->type == MT_TRIPLEGREENSHIELD1 || mobj->type == MT_TRIPLEGREENSHIELD2 || mobj->type == MT_TRIPLEGREENSHIELD3
|| mobj->type == MT_TRIPLEREDSHIELD1 || mobj->type == MT_TRIPLEREDSHIELD2 || mobj->type == MT_TRIPLEREDSHIELD3)

View File

@ -816,7 +816,7 @@ void P_ReloadRings(void)
}
continue;
}
if (!(mo->type == MT_RING || mo->type == MT_NIGHTSWING || mo->type == MT_COIN
if (!(mo->type == MT_RING || mo->type == MT_NIGHTSWING || mo->type == MT_COIN
|| mo->type == MT_BLUEBALL || mo->type == MT_RANDOMITEM))
continue;

View File

@ -1005,9 +1005,11 @@ void P_DoSuperTransformation(player_t *player, boolean giverings)
// Adds to the player's score
void P_AddPlayerScore(player_t *player, UINT32 amount)
{
return; // SRB2kart - no score.
UINT32 oldscore;
return; // SRB2kart - no score.
// This will probably be temporary until we do battle modes?
if (player->bot)
player = &players[consoleplayer];
@ -2785,7 +2787,7 @@ static void P_DoClimbing(player_t *player) // SRB2kart - unused
if (player->climbing == 0)
P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
if (player->climbing && P_IsObjectOnGround(player->mo))
{
@ -3413,6 +3415,7 @@ static void P_DoFiring(player_t *player, ticcmd_t *cmd) // SRB2kart - unused.
}
*/
#if 0
//
// P_DoSuperStuff()
//
@ -3420,7 +3423,6 @@ static void P_DoFiring(player_t *player, ticcmd_t *cmd) // SRB2kart - unused.
//
static void P_DoSuperStuff(player_t *player)
{
return; // SRB2kart - don't neeeeed
mobj_t *spark;
ticcmd_t *cmd = &player->cmd;
//if (player->mo->state >= &states[S_PLAY_SUPERTRANS1] && player->mo->state <= &states[S_PLAY_SUPERTRANS9])
@ -3552,6 +3554,7 @@ static void P_DoSuperStuff(player_t *player)
}
}
}
#endif
//
// P_SuperReady
@ -4536,12 +4539,12 @@ static void P_3dMovement(player_t *player)
{
ticcmd_t *cmd;
angle_t movepushangle, movepushsideangle; // Analog
INT32 topspeed, acceleration, thrustfactor;
//INT32 topspeed, acceleration, thrustfactor;
fixed_t movepushforward = 0, movepushside = 0;
INT32 mforward = 0, mbackward = 0;
angle_t dangle; // replaces old quadrants bits
boolean dangleflip = false; // SRB2kart - toaster
fixed_t normalspd = FixedMul(player->normalspeed, player->mo->scale);
//boolean dangleflip = false; // SRB2kart - toaster
//fixed_t normalspd = FixedMul(player->normalspeed, player->mo->scale);
boolean analogmove = false;
fixed_t oldMagnitude, newMagnitude;
#ifdef ESLOPE
@ -4629,7 +4632,7 @@ static void P_3dMovement(player_t *player)
if (dangle > ANGLE_180) //flip to keep to one side
{
dangle = InvAngle(dangle);
dangleflip = true;
//dangleflip = true;
}
// now use it to determine direction!
@ -4646,13 +4649,13 @@ static void P_3dMovement(player_t *player)
{
angle_t difference = dangle/2;
boolean reverse = (dangle >= ANGLE_90);
if (dangleflip)
difference = InvAngle(difference);
if (reverse)
difference += ANGLE_180;
P_InstaThrust(player->mo, player->mo->angle + difference, player->speed);
}
*/
@ -4668,7 +4671,7 @@ static void P_3dMovement(player_t *player)
player->aiming = cmd->aiming<<FRACBITS;
// Set the player speeds.
if (player->pflags & PF_SLIDING)
/*if (player->pflags & PF_SLIDING)
{
normalspd = FixedMul(36<<FRACBITS, player->mo->scale);
thrustfactor = 5;
@ -4699,14 +4702,14 @@ static void P_3dMovement(player_t *player)
thrustfactor = player->thrustfactor*2;
acceleration = player->accelstart/2 + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * player->acceleration/2;
/*
if (player->powers[pw_tailsfly])
topspeed = normalspd;
else if (player->mo->eflags & (MFE_UNDERWATER|MFE_GOOWATER))
{
topspeed = normalspd;
acceleration = 2*acceleration/3;
}*/
}
if (cmd->forwardmove < 0)
topspeed = 5<<16;
@ -4718,14 +4721,14 @@ static void P_3dMovement(player_t *player)
thrustfactor = player->thrustfactor;
acceleration = player->accelstart + (FixedDiv(player->speed, player->mo->scale)>>FRACBITS) * player->acceleration;
/*
if (player->powers[pw_tailsfly])
topspeed = normalspd/2;
else if (player->mo->eflags & (MFE_UNDERWATER|MFE_GOOWATER))
{
topspeed = normalspd/2;
acceleration = 2*acceleration/3;
}*/
}
if (cmd->forwardmove < 0)
topspeed = 5<<16;
else
@ -4741,6 +4744,7 @@ static void P_3dMovement(player_t *player)
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
*/
// Forward movement
if (player->climbing)
@ -9248,7 +9252,7 @@ void P_PlayerThink(player_t *player)
player->cmomy = player->cmomx = 0;
#endif
P_DoSuperStuff(player);
//P_DoSuperStuff(player);
P_CheckSneakerAndLivesTimer(player);
P_DoBubbleBreath(player); // Spawn Sonic's bubbles
P_CheckUnderwaterAndSpaceTimer(player); // Display the countdown drown numbers!
@ -9257,7 +9261,7 @@ void P_PlayerThink(player_t *player)
#if 1
// "Blur" a bit when you have speed shoes and are going fast enough
if ((player->powers[pw_super] || player->powers[pw_sneakers]
if ((player->powers[pw_super] || player->powers[pw_sneakers]
|| player->kartstuff[k_driftboost] || player->kartstuff[k_mushroomtimer]) // SRB2kart
&& (player->speed + abs(player->mo->momz)) > FixedMul(20*FRACUNIT,player->mo->scale))
{

View File

@ -497,7 +497,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"mkitm7", true, 72, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mkitm8", true, 72, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mkitmF", true, 72, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2kart - Skin sounds
{"kwin", false, 64, 0, -1, NULL, 0, SKSWIN, -1, LUMPERROR},
{"klose", false, 64, 0, -1, NULL, 0, SKSLOSE, -1, LUMPERROR},

View File

@ -468,6 +468,7 @@ static INT32 STRINGY(INT32 y)
return y;
}
/*
static INT32 SPLITFLAGS(INT32 f)
{
// Pass this V_SNAPTO(TOP|BOTTOM) and it'll trim them to account for splitscreen! -Red
@ -480,6 +481,7 @@ static INT32 SPLITFLAGS(INT32 f)
}
return f;
}
*/
static INT32 SCX(INT32 x)
{
@ -518,11 +520,12 @@ static INT32 SCR(INT32 r)
#define ST_DrawPadNumFromHudWS(h,n,q) V_DrawPaddedTallNum(SCX(hudinfo[h+!!splitscreen].x), SCY(hudinfo[h+!!splitscreen].y), V_NOSCALESTART|V_HUDTRANS, n, q)
#define ST_DrawPatchFromHudWS(h,p) V_DrawScaledPatch(SCX(hudinfo[h+!!splitscreen].x), SCY(hudinfo[h+!!splitscreen].y), V_NOSCALESTART|V_HUDTRANS, p)
/*
// Draw a number, scaled, over the view, maybe with set translucency
// Always draw the number completely since it's overlay
//
// Supports different colors! woo!
static void ST_DrawNightsOverlayNum(INT32 x /* right border */, INT32 y, INT32 a,
static void ST_DrawNightsOverlayNum(INT32 x, INT32 y, INT32 a,
INT32 num, patch_t **numpat, skincolors_t colornum)
{
INT32 w = SHORT(numpat[0]->width);
@ -548,6 +551,7 @@ static void ST_DrawNightsOverlayNum(INT32 x /* right border */, INT32 y, INT32 a
// Sorry chum, this function only draws UNSIGNED values!
}
*/
// Devmode information
static void ST_drawDebugInfo(void)
@ -616,6 +620,7 @@ static void ST_drawDebugInfo(void)
}
}
/*
static void ST_drawScore(void)
{
// SCORE:
@ -630,7 +635,9 @@ static void ST_drawScore(void)
else
ST_DrawNumFromHud(HUD_SCORENUM, stplyr->score);
}
*/
/*
static void ST_drawTime(void)
{
INT32 seconds, minutes, tictrn, tics;
@ -668,6 +675,7 @@ static void ST_drawTime(void)
}
}
}
*/
static inline void ST_drawRings(void)
{
@ -899,6 +907,7 @@ static void ST_drawFirstPersonHUD(void)
V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, p);
}
/*
// [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold
static skincolors_t linkColor[14] =
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEELBLUE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
@ -971,6 +980,7 @@ static void ST_drawNightsRecords(void)
}
}
}
*/
/*
static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
@ -1354,6 +1364,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
}
*/
/*
static void ST_drawWeaponRing(powertype_t weapon, INT32 rwflag, INT32 wepflag, INT32 xoffs, patch_t *pat)
{
INT32 txtflags = 0, patflags = 0;
@ -1385,6 +1396,7 @@ static void ST_drawWeaponRing(powertype_t weapon, INT32 rwflag, INT32 wepflag, I
else if (stplyr->ringweapons & rwflag)
V_DrawScaledPatch(8 + xoffs, STRINGY(162), V_SNAPTOLEFT|V_TRANSLUCENT, pat);
}
*/
/*
static void ST_drawMatchHUD(void) // SRB2kart - unused.
@ -1631,6 +1643,7 @@ static void ST_drawSpecialStageHUD(void) // SRB2kart - unused.
}
*/
/*
static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offset)
{
INT32 interval, i;
@ -1670,6 +1683,7 @@ static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offse
V_DrawScaledPatch(hudinfo[HUD_HUNTPICS].x+offset, STRINGY(hudinfo[HUD_HUNTPICS].y), V_HUDTRANS, patches[i]);
return interval;
}
*/
/*
// Separated a few things to stop the SOUND EFFECTS BLARING UGH SHUT UP AAAA

View File

@ -257,7 +257,7 @@ void Y_IntermissionDrawer(void)
}
else if (intertype == int_race)
{
INT32 i = 0, j = 0;
INT32 j = 0;
INT32 x = 4;
INT32 y = 48;
char name[MAXPLAYERNAME+1];
@ -1850,29 +1850,20 @@ static void Y_CalculateTournamentPoints(void)
INT32 i, j;
boolean completed[MAXPLAYERS];
INT32 numplayersingame = 0;
INT32 zz1 = 0, zz2 = 0, zz3 = 0, zz4 = 0, zz5 = 0, zz6 = 0, zz7 = 0, zz8 = 0,
zz9 = 0, zz10 = 0, zz11 = 0, zz12 = 0, zz13 = 0, zz14 = 0, zz15 = 0, zz16 = 0;
INT32 increase[MAXPLAYERS];
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i])
numplayersingame++;
increase[i] = numplayersingame-i;
if (increase[i] < 0)
increase[i] = 0;
}
zz1 = numplayersingame; zz2 = numplayersingame-1; zz3 = numplayersingame-2; zz4 = numplayersingame-3;
zz5 = numplayersingame-4; zz6 = numplayersingame-5; zz7 = numplayersingame-6; zz8 = numplayersingame-7;
zz9 = numplayersingame-8; zz10= numplayersingame-9; zz11= numplayersingame-10; zz12= numplayersingame-11;
zz13= numplayersingame-12; zz14= numplayersingame-13; zz15= numplayersingame-14; zz16= numplayersingame-15;
if (zz1 < 0) zz1 = 0; if (zz2 < 0) zz2 = 0; if (zz3 < 0) zz3 = 0; if (zz4 < 0) zz4 = 0;
if (zz5 < 0) zz5 = 0; if (zz6 < 0) zz6 = 0; if (zz7 < 0) zz7 = 0; if (zz8 < 0) zz8 = 0;
if (zz9 < 0) zz9 = 0; if (zz10< 0) zz10= 0; if (zz11< 0) zz11= 0; if (zz12< 0) zz12= 0;
if (zz13< 0) zz13= 0; if (zz14< 0) zz14= 0; if (zz15< 0) zz15= 0; if (zz16< 0) zz16= 0;
INT32 increase[MAXPLAYERS] = {zz1,zz2,zz3,zz4,zz5,zz6,zz7,zz8,zz9,zz10,zz11,zz12,zz13,zz14,zz15,zz16};
// Initialize variables
for (j = 0; j < MAXPLAYERS; j++)
data.match.scores[j] = INT32_MAX;