remove the prefix since everything seems to function

This commit is contained in:
toaster 2021-04-17 11:30:08 +01:00
parent 2ead3f7ee5
commit 00972a83d2
27 changed files with 1541 additions and 1541 deletions

View file

@ -4781,7 +4781,7 @@ static INT16 Consistancy(void)
{
ret += players[i].mo->x;
ret -= players[i].mo->y;
ret += players[i].ktemp_itemtype;
ret += players[i].itemtype;
ret *= i+1;
}
}

View file

@ -1417,7 +1417,7 @@ static void SendNameAndColor(UINT8 n)
player->skincolor = cv_playercolor[n].value;
if (player->mo && !player->ktemp_dye)
if (player->mo && !player->dye)
player->mo->color = player->skincolor;
// Update follower for local games:
@ -1878,7 +1878,7 @@ static INT32 FindPlayerByPlace(INT32 place)
for (playernum = 0; playernum < MAXPLAYERS; ++playernum)
if (playeringame[playernum])
{
if (players[playernum].ktemp_position == place)
if (players[playernum].position == place)
{
return playernum;
}
@ -1902,7 +1902,7 @@ static void GetViewablePlayerPlaceRange(INT32 *first, INT32 *last)
for (i = 0; i < MAXPLAYERS; ++i)
if (G_CouldView(i))
{
place = players[i].ktemp_position;
place = players[i].position;
if (place < (*first))
(*first) = place;
if (place > (*last))
@ -2973,7 +2973,7 @@ static void Command_Respawn(void)
}
// todo: this probably isnt necessary anymore with v2
if (players[consoleplayer].mo && (P_PlayerInPain(&players[consoleplayer]) || spbplace == players[consoleplayer].ktemp_position)) // KART: Nice try, but no, you won't be cheesing spb anymore (x2)
if (players[consoleplayer].mo && (P_PlayerInPain(&players[consoleplayer]) || spbplace == players[consoleplayer].position)) // KART: Nice try, but no, you won't be cheesing spb anymore (x2)
{
CONS_Printf(M_GetText("Nice try.\n"));
return;
@ -2988,7 +2988,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum)
INT32 respawnplayer = READINT32(*cp);
// You can't respawn someone else. Nice try, there.
if (respawnplayer != playernum || P_PlayerInPain(&players[respawnplayer]) || spbplace == players[respawnplayer].ktemp_position) // srb2kart: "|| (!(gametyperules & GTR_CIRCUIT))"
if (respawnplayer != playernum || P_PlayerInPain(&players[respawnplayer]) || spbplace == players[respawnplayer].position) // srb2kart: "|| (!(gametyperules & GTR_CIRCUIT))"
{
CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]);
if (server)
@ -4876,8 +4876,8 @@ static void Got_GiveItemcmd(UINT8 **cp, INT32 playernum)
return;
}
players[playernum].ktemp_itemtype = item;
players[playernum].ktemp_itemamount = amt;
players[playernum].itemtype = item;
players[playernum].itemamount = amt;
}
/** Prints the number of displayplayers[0].

View file

@ -119,7 +119,7 @@ typedef enum
// Specific level gimmicks.
CR_SLIDING,
CR_ZOOMTUBE,
} carrytype_t; // ktemp_carry
} carrytype_t; // carry
/*
To use: #define FOREACH( name, number )
@ -236,7 +236,7 @@ typedef enum
} karthudtype_t;
// QUICKLY GET RING TOTAL, INCLUDING RINGS CURRENTLY IN THE PICKUP ANIMATION
#define RINGTOTAL(p) (p->rings + p->ktemp_pickuprings)
#define RINGTOTAL(p) (p->rings + p->pickuprings)
// CONSTANTS FOR TRICK PANELS
#define TRICKMOMZRAMP (30)
@ -345,106 +345,106 @@ typedef struct player_s
UINT32 score; // player score
UINT16 ktemp_nocontrol; //for linedef exec 427
UINT8 ktemp_carry;
UINT16 ktemp_dye;
UINT16 nocontrol; //for linedef exec 427
UINT8 carry;
UINT16 dye;
// SRB2kart stuff
INT32 karthud[NUMKARTHUD];
// Basic gameplay things
UINT8 ktemp_position; // Used for Kart positions, mostly for deterministic stuff
UINT8 ktemp_oldposition; // Used for taunting when you pass someone
UINT8 ktemp_positiondelay; // Used for position number, so it can grow when passing/being passed
UINT8 position; // Used for Kart positions, mostly for deterministic stuff
UINT8 oldposition; // Used for taunting when you pass someone
UINT8 positiondelay; // Used for position number, so it can grow when passing/being passed
UINT32 distancetofinish;
waypoint_t *nextwaypoint;
respawnvars_t respawn; // Respawn info
tic_t airtime; // Keep track of how long you've been in the air
UINT8 ktemp_startboost; // (0 to 125) - Boost you get from start of race or respawn drop dash
tic_t airtime; // Keep track of how long you've been in the air
UINT8 startboost; // (0 to 125) - Boost you get from start of race or respawn drop dash
UINT16 ktemp_flashing;
UINT16 ktemp_spinouttimer; // Spin-out from a banana peel or oil slick (was "pw_bananacam")
UINT8 ktemp_spinouttype; // Determines the mode of spinout/wipeout, see kartspinoutflags_t
UINT8 ktemp_instashield; // Instashield no-damage animation timer
UINT8 ktemp_wipeoutslow; // Timer before you slowdown when getting wiped out
UINT8 ktemp_justbumped; // Prevent players from endlessly bumping into each other
UINT16 flashing;
UINT16 spinouttimer; // Spin-out from a banana peel or oil slick (was "pw_bananacam")
UINT8 spinouttype; // Determines the mode of spinout/wipeout, see kartspinoutflags_t
UINT8 instashield; // Instashield no-damage animation timer
UINT8 wipeoutslow; // Timer before you slowdown when getting wiped out
UINT8 justbumped; // Prevent players from endlessly bumping into each other
UINT8 tumbleBounces;
UINT16 tumbleHeight;
SINT8 ktemp_drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
fixed_t ktemp_driftcharge; // Charge your drift so you can release a burst of speed
UINT8 ktemp_driftboost; // (0 to 125) - Boost you get from drifting
SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
fixed_t driftcharge; // Charge your drift so you can release a burst of speed
UINT8 driftboost; // (0 to 125) - Boost you get from drifting
SINT8 ktemp_aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked
SINT8 aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked
INT32 aizdrifttilt;
INT32 aizdriftturn;
fixed_t ktemp_offroad; // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
UINT8 ktemp_waterskip; // Water skipping counter
fixed_t offroad; // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
UINT8 waterskip; // Water skipping counter
UINT16 ktemp_tiregrease; // Reduced friction timer after hitting a horizontal spring
UINT16 ktemp_springstars; // Spawn stars around a player when they hit a spring
UINT16 ktemp_springcolor; // Color of spring stars
UINT8 ktemp_dashpadcooldown; // Separate the vanilla SA-style dash pads from using ktemp_flashing
UINT16 tiregrease; // Reduced friction timer after hitting a horizontal spring
UINT16 springstars; // Spawn stars around a player when they hit a spring
UINT16 springcolor; // Color of spring stars
UINT8 dashpadcooldown; // Separate the vanilla SA-style dash pads from using flashing
UINT16 ktemp_spindash; // Spindash charge timer
fixed_t ktemp_spindashspeed; // Spindash release speed
UINT8 ktemp_spindashboost; // Spindash release boost timer
UINT16 spindash; // Spindash charge timer
fixed_t spindashspeed; // Spindash release speed
UINT8 spindashboost; // Spindash release boost timer
UINT8 ktemp_numboosts; // Count of how many boosts are being stacked, for after image spawning
fixed_t ktemp_boostpower; // Base boost value, for offroad
fixed_t ktemp_speedboost; // Boost value smoothing for max speed
fixed_t ktemp_accelboost; // Boost value smoothing for acceleration
fixed_t ktemp_handleboost; // Boost value smoothing for handling
angle_t ktemp_boostangle; // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted.
UINT8 numboosts; // Count of how many boosts are being stacked, for after image spawning
fixed_t boostpower; // Base boost value, for offroad
fixed_t speedboost; // Boost value smoothing for max speed
fixed_t accelboost; // Boost value smoothing for acceleration
fixed_t handleboost; // Boost value smoothing for handling
angle_t boostangle; // angle set when not spun out OR boosted to determine what direction you should keep going at if you're spun out and boosted.
fixed_t ktemp_draftpower; // (0 to FRACUNIT) - Drafting power, doubles your top speed & acceleration at max
UINT16 ktemp_draftleeway; // Leniency timer before removing draft power
SINT8 ktemp_lastdraft; // (-1 to 15) - Last player being drafted
fixed_t draftpower; // (0 to FRACUNIT) - Drafting power, doubles your top speed & acceleration at max
UINT16 draftleeway; // Leniency timer before removing draft power
SINT8 lastdraft; // (-1 to 15) - Last player being drafted
UINT16 ktemp_itemroulette; // Used for the roulette when deciding what item to give you (was "pw_kartitem")
UINT8 ktemp_roulettetype; // Used for the roulette, for deciding type (0 = normal, 1 = better, 2 = eggman mark)
UINT16 itemroulette; // Used for the roulette when deciding what item to give you (was "pw_kartitem")
UINT8 roulettetype; // Used for the roulette, for deciding type (0 = normal, 1 = better, 2 = eggman mark)
// Item held stuff
SINT8 ktemp_itemtype; // KITEM_ constant for item number
UINT8 ktemp_itemamount; // Amount of said item
SINT8 ktemp_throwdir; // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
SINT8 itemtype; // KITEM_ constant for item number
UINT8 itemamount; // Amount of said item
SINT8 throwdir; // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
UINT8 ktemp_sadtimer; // How long you've been sad
UINT8 sadtimer; // How long you've been sad
// player's ring count
SINT8 rings;
UINT8 ktemp_pickuprings; // Number of rings being picked up before added to the counter (prevents rings from being deleted forever over 20)
UINT8 ktemp_ringdelay; // (0 to 3) - 3 tic delay between every ring usage
UINT16 ktemp_ringboost; // Ring boost timer
UINT8 ktemp_sparkleanim; // (0 to 19) - Angle offset for ring sparkle animation
UINT8 ktemp_superring; // Spawn rings on top of you every tic!
UINT8 pickuprings; // Number of rings being picked up before added to the counter (prevents rings from being deleted forever over 20)
UINT8 ringdelay; // (0 to 3) - 3 tic delay between every ring usage
UINT16 ringboost; // Ring boost timer
UINT8 sparkleanim; // (0 to 19) - Angle offset for ring sparkle animation
UINT8 superring; // Spawn rings on top of you every tic!
UINT8 ktemp_curshield; // see kartshields_t
UINT8 ktemp_bubblecool; // Bubble Shield use cooldown
UINT8 ktemp_bubbleblowup; // Bubble Shield usage blowup
UINT16 ktemp_flamedash; // Flame Shield dash power
UINT16 ktemp_flamemeter; // Flame Shield dash meter left
UINT8 ktemp_flamelength; // Flame Shield dash meter, number of segments
UINT8 curshield; // see kartshields_t
UINT8 bubblecool; // Bubble Shield use cooldown
UINT8 bubbleblowup; // Bubble Shield usage blowup
UINT16 flamedash; // Flame Shield dash power
UINT16 flamemeter; // Flame Shield dash meter left
UINT8 flamelength; // Flame Shield dash meter, number of segments
UINT16 ktemp_hyudorotimer; // Duration of the Hyudoro offroad effect itself
SINT8 ktemp_stealingtimer; // if >0 you are stealing, if <0 you are being stolen from
UINT16 hyudorotimer; // Duration of the Hyudoro offroad effect itself
SINT8 stealingtimer; // if >0 you are stealing, if <0 you are being stolen from
UINT16 ktemp_sneakertimer; // Duration of a Sneaker Boost (from Sneakers or level boosters)
UINT8 ktemp_numsneakers; // Number of stacked sneaker effects
UINT8 ktemp_floorboost; // (0 to 3) - Prevents Sneaker sounds for a brief duration when triggered by a floor panel
UINT16 sneakertimer; // Duration of a Sneaker Boost (from Sneakers or level boosters)
UINT8 numsneakers; // Number of stacked sneaker effects
UINT8 floorboost; // (0 to 3) - Prevents Sneaker sounds for a brief duration when triggered by a floor panel
INT16 ktemp_growshrinktimer; // > 0 = Big, < 0 = small
UINT16 ktemp_rocketsneakertimer; // Rocket Sneaker duration timer
UINT16 ktemp_invincibilitytimer; // Invincibility timer
INT16 growshrinktimer; // > 0 = Big, < 0 = small
UINT16 rocketsneakertimer; // Rocket Sneaker duration timer
UINT16 invincibilitytimer; // Invincibility timer
UINT8 ktemp_eggmanexplode; // Fake item recieved, explode in a few seconds
SINT8 ktemp_eggmanblame; // (-1 to 15) - Fake item recieved, who set this fake
UINT8 eggmanexplode; // Fake item recieved, explode in a few seconds
SINT8 eggmanblame; // (-1 to 15) - Fake item recieved, who set this fake
UINT8 ktemp_bananadrag; // After a second of holding a banana behind you, you start to slow down
UINT8 bananadrag; // After a second of holding a banana behind you, you start to slow down
SINT8 ktemp_lastjawztarget; // (-1 to 15) - Last person you target with jawz, for playing the target switch sfx
UINT8 ktemp_jawztargetdelay; // (0 to 5) - Delay for Jawz target switching, to make it less twitchy
SINT8 lastjawztarget; // (-1 to 15) - Last person you target with jawz, for playing the target switch sfx
UINT8 jawztargetdelay; // (0 to 5) - Delay for Jawz target switching, to make it less twitchy
UINT8 trickpanel; // Trick panel state
fixed_t trickmomx;
@ -452,7 +452,7 @@ typedef struct player_s
fixed_t trickmomz;
UINT32 roundscore; // battle score this round
UINT8 ktemp_emeralds;
UINT8 emeralds;
UINT8 bumpers;
INT16 karmadelay;
INT16 spheres;
@ -499,7 +499,7 @@ typedef struct player_s
angle_t awayviewaiming; // Used for cut-away view
boolean spectator;
tic_t ktemp_spectatewait; // reimplementable as UINT8 queue - How long have you been waiting as a spectator
tic_t spectatewait; // reimplementable as UINT8 queue - How long have you been waiting as a spectator
boolean bot;
botvars_t botvars;

View file

@ -2909,7 +2909,7 @@ void F_TextPromptDrawer(void)
}
#define nocontrolallowed(j) {\
players[j].ktemp_nocontrol = 1;\
players[j].nocontrol = 1;\
if (players[j].mo)\
{\
if (players[j].mo->state == states+S_KART_STILL && players[j].mo->tics != -1)\
@ -2980,7 +2980,7 @@ void F_TextPromptTicker(void)
{
UINT8 j;
players[i].ktemp_nocontrol = 1;
players[i].nocontrol = 1;
// Both players' controls are locked,
// But only the triggering player can advance the prompt.

View file

@ -748,14 +748,14 @@ void G_WriteGhostTic(mobj_t *ghost, INT32 playernum)
}
if (ghost->player && (
ghostext[playernum].kartitem != ghost->player->ktemp_itemtype ||
ghostext[playernum].kartamount != ghost->player->ktemp_itemamount ||
ghostext[playernum].kartitem != ghost->player->itemtype ||
ghostext[playernum].kartamount != ghost->player->itemamount ||
ghostext[playernum].kartbumpers != ghost->player->bumpers
))
{
ghostext[playernum].flags |= EZT_KART;
ghostext[playernum].kartitem = ghost->player->ktemp_itemtype;
ghostext[playernum].kartamount = ghost->player->ktemp_itemamount;
ghostext[playernum].kartitem = ghost->player->itemtype;
ghostext[playernum].kartamount = ghost->player->itemamount;
ghostext[playernum].kartbumpers = ghost->player->bumpers;
}
@ -1035,16 +1035,16 @@ void G_ConsGhostTic(INT32 playernum)
else
ghostext[playernum].desyncframes = 0;
if (players[playernum].ktemp_itemtype != ghostext[playernum].kartitem
|| players[playernum].ktemp_itemamount != ghostext[playernum].kartamount
if (players[playernum].itemtype != ghostext[playernum].kartitem
|| players[playernum].itemamount != ghostext[playernum].kartamount
|| players[playernum].bumpers != ghostext[playernum].kartbumpers)
{
if (demosynced)
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));
demosynced = false;
players[playernum].ktemp_itemtype = ghostext[playernum].kartitem;
players[playernum].ktemp_itemamount = ghostext[playernum].kartamount;
players[playernum].itemtype = ghostext[playernum].kartitem;
players[playernum].itemamount = ghostext[playernum].kartamount;
players[playernum].bumpers = ghostext[playernum].kartbumpers;
}
}

View file

@ -2179,8 +2179,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
}
else
{
itemroulette = (players[player].ktemp_itemroulette > 0 ? 1 : 0);
roulettetype = players[player].ktemp_roulettetype;
itemroulette = (players[player].itemroulette > 0 ? 1 : 0);
roulettetype = players[player].roulettetype;
if (players[player].pflags & PF_ITEMOUT)
{
@ -2189,13 +2189,13 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
}
else
{
itemtype = players[player].ktemp_itemtype;
itemamount = players[player].ktemp_itemamount;
itemtype = players[player].itemtype;
itemamount = players[player].itemamount;
}
// Keep Shrink status, remove Grow status
if (players[player].ktemp_growshrinktimer < 0)
growshrinktimer = players[player].ktemp_growshrinktimer;
if (players[player].growshrinktimer < 0)
growshrinktimer = players[player].growshrinktimer;
else
growshrinktimer = 0;
@ -2205,7 +2205,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
kickstartaccel = players[player].kickstartaccel;
khudfault = players[player].karthud[khud_fault];
nocontrol = players[player].ktemp_nocontrol;
nocontrol = players[player].nocontrol;
laps = players[player].laps;
totalring = players[player].totalring;
@ -2270,17 +2270,17 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
p->xtralife = xtralife;
// SRB2kart
p->ktemp_itemroulette = itemroulette;
p->ktemp_roulettetype = roulettetype;
p->ktemp_itemtype = itemtype;
p->ktemp_itemamount = itemamount;
p->ktemp_growshrinktimer = growshrinktimer;
p->itemroulette = itemroulette;
p->roulettetype = roulettetype;
p->itemtype = itemtype;
p->itemamount = itemamount;
p->growshrinktimer = growshrinktimer;
p->bumpers = bumper;
p->karmadelay = comebacktime;
p->ktemp_eggmanblame = -1;
p->ktemp_lastdraft = -1;
p->eggmanblame = -1;
p->lastdraft = -1;
p->karthud[khud_fault] = khudfault;
p->ktemp_nocontrol = nocontrol;
p->nocontrol = nocontrol;
p->kickstartaccel = kickstartaccel;
memcpy(&p->respawn, &respawn, sizeof (p->respawn));

View file

@ -2353,11 +2353,11 @@ static void HU_DrawRankings(void)
if (completed[i] || !playeringame[i] || players[i].spectator || !players[i].mo)
continue;
if (players[i].ktemp_position >= lowestposition)
if (players[i].position >= lowestposition)
continue;
tab[scorelines].num = i;
lowestposition = players[i].ktemp_position;
lowestposition = players[i].position;
}
i = tab[scorelines].num;

View file

@ -41,7 +41,7 @@ INT32 K_StartingBumperCount(void)
boolean K_IsPlayerWanted(player_t *player)
{
return (player->ktemp_position == 1);
return (player->position == 1);
}
void K_SpawnBattlePoints(player_t *source, player_t *victim, UINT8 amount)
@ -146,7 +146,7 @@ void K_CheckEmeralds(player_t *player)
{
UINT8 i;
if (!ALLCHAOSEMERALDS(player->ktemp_emeralds))
if (!ALLCHAOSEMERALDS(player->emeralds))
{
return;
}
@ -238,12 +238,12 @@ void K_DropEmeraldsFromPlayer(player_t *player, UINT32 emeraldType)
{
UINT32 emeraldFlag = (1 << i);
if ((player->ktemp_emeralds & emeraldFlag) && (emeraldFlag & emeraldType))
if ((player->emeralds & emeraldFlag) && (emeraldFlag & emeraldType))
{
mobj_t *emerald = K_SpawnChaosEmerald(player->mo->x, player->mo->y, player->mo->z, player->mo->angle - ANGLE_90, flip, emeraldFlag);
P_SetTarget(&emerald->target, player->mo);
player->ktemp_emeralds &= ~emeraldFlag;
player->emeralds &= ~emeraldFlag;
}
}
}
@ -257,7 +257,7 @@ UINT8 K_NumEmeralds(player_t *player)
{
UINT32 emeraldFlag = (1 << i);
if (player->ktemp_emeralds & emeraldFlag)
if (player->emeralds & emeraldFlag)
{
num++;
}
@ -310,7 +310,7 @@ void K_RunPaperItemSpawners(void)
continue;
}
emeraldsSpawned |= players[i].ktemp_emeralds;
emeraldsSpawned |= players[i].emeralds;
if ((players[i].exiting > 0 || (players[i].pflags & PF_ELIMINATED))
|| ((gametyperules & GTR_BUMPERS) && players[i].bumpers <= 0))

View file

@ -274,10 +274,10 @@ boolean K_PlayerUsesBotMovement(player_t *player)
boolean K_BotCanTakeCut(player_t *player)
{
if (!K_ApplyOffroad(player)
|| player->ktemp_itemtype == KITEM_SNEAKER
|| player->ktemp_itemtype == KITEM_ROCKETSNEAKER
|| player->ktemp_itemtype == KITEM_INVINCIBILITY
|| player->ktemp_itemtype == KITEM_HYUDORO)
|| player->itemtype == KITEM_SNEAKER
|| player->itemtype == KITEM_ROCKETSNEAKER
|| player->itemtype == KITEM_INVINCIBILITY
|| player->itemtype == KITEM_HYUDORO)
return true;
return false;
@ -716,7 +716,7 @@ static UINT8 K_TrySpindash(player_t *player)
{
const tic_t difficultyModifier = (TICRATE/6);
if (player->ktemp_spindashboost || player->ktemp_tiregrease)
if (player->spindashboost || player->tiregrease)
{
// You just released a spindash, you don't need to try again yet, jeez.
return 0;
@ -749,7 +749,7 @@ static UINT8 K_TrySpindash(player_t *player)
}
// Logic for normal racing.
if (player->ktemp_flashing > 0)
if (player->flashing > 0)
{
// Don't bother trying to spindash.
// Trying to spindash while flashing is fine during POSITION, but not during the actual race.
@ -757,7 +757,7 @@ static UINT8 K_TrySpindash(player_t *player)
}
if (player->speed < 10*mapobjectscale // Below the speed threshold
&& player->ktemp_speedboost < (FRACUNIT/8)) // If you have other boosts, you can probably trust it.
&& player->speedboost < (FRACUNIT/8)) // If you have other boosts, you can probably trust it.
{
INT32 chargingPoint = (K_GetSpindashChargeTime(player) + difficultyModifier);
@ -765,7 +765,7 @@ static UINT8 K_TrySpindash(player_t *player)
// Sounds counter-productive, but that's actually the best strategy after the race has started.
chargingPoint -= player->botvars.difficulty * difficultyModifier;
if (player->ktemp_spindash > chargingPoint)
if (player->spindash > chargingPoint)
{
// Time to release.
return 0;

View file

@ -64,7 +64,7 @@ static boolean K_BotUseItemNearPlayer(player_t *player, ticcmd_t *cmd, fixed_t r
if (target->mo == NULL || P_MobjWasRemoved(target->mo)
|| player == target || target->spectator
|| target->ktemp_flashing)
|| target->flashing)
{
continue;
}
@ -117,7 +117,7 @@ static boolean K_PlayerNearSpot(player_t *player, fixed_t x, fixed_t y, fixed_t
if (target->mo == NULL || P_MobjWasRemoved(target->mo)
|| player == target || target->spectator
|| target->ktemp_flashing)
|| target->flashing)
{
continue;
}
@ -190,7 +190,7 @@ static boolean K_PlayerInCone(player_t *player, fixed_t radius, UINT16 cone, boo
if (target->mo == NULL || P_MobjWasRemoved(target->mo)
|| player == target || target->spectator
|| target->ktemp_flashing
|| target->flashing
|| !P_CheckSight(player->mo, target->mo))
{
continue;
@ -401,13 +401,13 @@ static void K_BotItemGenericOrbitShield(player_t *player, ticcmd_t *cmd)
--------------------------------------------------*/
static void K_BotItemSneaker(player_t *player, ticcmd_t *cmd)
{
if ((player->ktemp_offroad && K_ApplyOffroad(player)) // Stuck in offroad, use it NOW
if ((player->offroad && K_ApplyOffroad(player)) // Stuck in offroad, use it NOW
|| K_GetWaypointIsShortcut(player->nextwaypoint) == true // Going toward a shortcut!
|| player->speed < K_GetKartSpeed(player, false)/2 // Being slowed down too much
|| player->ktemp_speedboost > (FRACUNIT/8) // Have another type of boost (tethering)
|| player->speedboost > (FRACUNIT/8) // Have another type of boost (tethering)
|| player->botvars.itemconfirm > 4*TICRATE) // Held onto it for too long
{
if (!player->ktemp_sneakertimer && !(player->pflags & PF_ATTACKDOWN))
if (!player->sneakertimer && !(player->pflags & PF_ATTACKDOWN))
{
cmd->buttons |= BT_ATTACK;
player->botvars.itemconfirm = 2*TICRATE;
@ -435,7 +435,7 @@ static void K_BotItemRocketSneaker(player_t *player, ticcmd_t *cmd)
{
if (player->botvars.itemconfirm > TICRATE)
{
if (!player->ktemp_sneakertimer && !(player->pflags & PF_ATTACKDOWN))
if (!player->sneakertimer && !(player->pflags & PF_ATTACKDOWN))
{
cmd->buttons |= BT_ATTACK;
player->botvars.itemconfirm = 0;
@ -487,7 +487,7 @@ static void K_BotItemBanana(player_t *player, ticcmd_t *cmd, INT16 turnamt)
throwdir = -1;
}
if (player->botvars.itemconfirm > 2*TICRATE || player->ktemp_bananadrag >= TICRATE)
if (player->botvars.itemconfirm > 2*TICRATE || player->bananadrag >= TICRATE)
{
K_BotGenericPressItem(player, cmd, throwdir);
}
@ -540,7 +540,7 @@ static void K_BotItemMine(player_t *player, ticcmd_t *cmd, INT16 turnamt)
if (player->botvars.itemconfirm > 2*TICRATE || player->ktemp_bananadrag >= TICRATE)
if (player->botvars.itemconfirm > 2*TICRATE || player->bananadrag >= TICRATE)
{
K_BotGenericPressItem(player, cmd, throwdir);
}
@ -577,13 +577,13 @@ static void K_BotItemEggman(player_t *player, ticcmd_t *cmd)
throwdir = -1;
}
if (stealth > 1 || player->ktemp_itemroulette > 0)
if (stealth > 1 || player->itemroulette > 0)
{
player->botvars.itemconfirm += player->botvars.difficulty * 4;
throwdir = -1;
}
if (player->botvars.itemconfirm > 2*TICRATE || player->ktemp_bananadrag >= TICRATE)
if (player->botvars.itemconfirm > 2*TICRATE || player->bananadrag >= TICRATE)
{
K_BotGenericPressItem(player, cmd, throwdir);
}
@ -664,7 +664,7 @@ static void K_BotItemEggmanShield(player_t *player, ticcmd_t *cmd)
--------------------------------------------------*/
static void K_BotItemEggmanExplosion(player_t *player, ticcmd_t *cmd)
{
if (player->ktemp_position == 1)
if (player->position == 1)
{
cmd->forwardmove /= 2;
cmd->buttons |= BT_BRAKE;
@ -746,7 +746,7 @@ static void K_BotItemJawz(player_t *player, ticcmd_t *cmd)
throwdir = -1;
}
if (player->ktemp_lastjawztarget != -1)
if (player->lastjawztarget != -1)
{
player->botvars.itemconfirm += player->botvars.difficulty * 2;
throwdir = 1;
@ -801,13 +801,13 @@ static void K_BotItemBubble(player_t *player, ticcmd_t *cmd)
{
boolean hold = false;
if (player->ktemp_bubbleblowup <= 0)
if (player->bubbleblowup <= 0)
{
UINT8 i;
player->botvars.itemconfirm++;
if (player->ktemp_bubblecool <= 0)
if (player->bubblecool <= 0)
{
const fixed_t radius = 192 * player->mo->scale;
@ -825,7 +825,7 @@ static void K_BotItemBubble(player_t *player, ticcmd_t *cmd)
if (target->mo == NULL || P_MobjWasRemoved(target->mo)
|| player == target || target->spectator
|| target->ktemp_flashing)
|| target->flashing)
{
continue;
}
@ -844,14 +844,14 @@ static void K_BotItemBubble(player_t *player, ticcmd_t *cmd)
}
}
}
else if (player->ktemp_bubbleblowup >= bubbletime)
else if (player->bubbleblowup >= bubbletime)
{
if (player->botvars.itemconfirm >= 10*TICRATE)
{
hold = true;
}
}
else if (player->ktemp_bubbleblowup < bubbletime)
else if (player->bubbleblowup < bubbletime)
{
hold = true;
}
@ -882,9 +882,9 @@ static void K_BotItemFlame(player_t *player, ticcmd_t *cmd)
}
else if (player->pflags & PF_HOLDREADY)
{
INT32 flamemax = player->ktemp_flamelength * flameseg;
INT32 flamemax = player->flamelength * flameseg;
if (player->ktemp_flamemeter < flamemax || flamemax == 0)
if (player->flamemeter < flamemax || flamemax == 0)
{
cmd->buttons |= BT_ATTACK;
}
@ -912,7 +912,7 @@ static void K_BotItemRings(player_t *player, ticcmd_t *cmd)
INT32 saferingsval = 16 - K_GetKartRingPower(player, false);
if (player->speed < K_GetKartSpeed(player, false)/2 // Being slowed down too much
|| player->ktemp_speedboost > (FRACUNIT/5)) // Have another type of boost (tethering)
|| player->speedboost > (FRACUNIT/5)) // Have another type of boost (tethering)
{
saferingsval -= 5;
}
@ -985,16 +985,16 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
return;
}
if (player->ktemp_itemroulette)
if (player->itemroulette)
{
// Mashing behaviors
K_BotItemRouletteMash(player, cmd);
return;
}
if (player->ktemp_stealingtimer == 0)
if (player->stealingtimer == 0)
{
if (player->ktemp_eggmanexplode)
if (player->eggmanexplode)
{
K_BotItemEggmanExplosion(player, cmd);
}
@ -1002,16 +1002,16 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
{
K_BotItemEggman(player, cmd);
}
else if (player->ktemp_rocketsneakertimer > 0)
else if (player->rocketsneakertimer > 0)
{
K_BotItemRocketSneaker(player, cmd);
}
else
{
switch (player->ktemp_itemtype)
switch (player->itemtype)
{
default:
if (player->ktemp_itemtype != KITEM_NONE)
if (player->itemtype != KITEM_NONE)
{
K_BotItemGenericTap(player, cmd);
}
@ -1027,7 +1027,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
K_BotItemGenericTap(player, cmd);
break;
case KITEM_ROCKETSNEAKER:
if (player->ktemp_rocketsneakertimer <= 0)
if (player->rocketsneakertimer <= 0)
{
K_BotItemGenericTap(player, cmd);
}
@ -1054,7 +1054,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
{
K_BotItemGenericOrbitShield(player, cmd);
}
else if (player->ktemp_position != 1) // Hold onto orbiting items when in 1st :)
else if (player->position != 1) // Hold onto orbiting items when in 1st :)
/* FALL-THRU */
case KITEM_BALLHOG:
{
@ -1066,7 +1066,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
{
K_BotItemGenericOrbitShield(player, cmd);
}
else if (player->ktemp_position != 1) // Hold onto orbiting items when in 1st :)
else if (player->position != 1) // Hold onto orbiting items when in 1st :)
{
K_BotItemJawz(player, cmd);
}

View file

@ -322,7 +322,7 @@ static boolean K_FindBlockingWalls(line_t *line)
// set openrange, opentop, openbottom
P_LineOpening(line, globalsmuggle.botmo);
if (globalsmuggle.botmo->player->ktemp_waterskip)
if (globalsmuggle.botmo->player->waterskip)
maxstep += maxstepmove;
if (P_MobjTouchingSectorSpecial(globalsmuggle.botmo, 1, 13, false))
@ -651,15 +651,15 @@ static boolean K_FindObjectsForNudging(mobj_t *thing)
if ((RINGTOTAL(globalsmuggle.botmo->player) < 20 && !(globalsmuggle.botmo->player->pflags & PF_RINGLOCK)
&& P_CanPickupItem(globalsmuggle.botmo->player, 0))
&& !thing->extravalue1
&& (globalsmuggle.botmo->player->ktemp_itemtype != KITEM_THUNDERSHIELD))
&& (globalsmuggle.botmo->player->itemtype != KITEM_THUNDERSHIELD))
{
K_AddAttackObject(thing, side, (RINGTOTAL(globalsmuggle.botmo->player) < 3) ? 5 : 1);
}
break;
case MT_PLAYER:
if (thing->player
&& !thing->player->ktemp_hyudorotimer
&& !globalsmuggle.botmo->player->ktemp_hyudorotimer)
&& !thing->player->hyudorotimer
&& !globalsmuggle.botmo->player->hyudorotimer)
{
// There REALLY ought to be a better way to handle this logic, right?!
// Squishing
@ -672,32 +672,32 @@ static boolean K_FindObjectsForNudging(mobj_t *thing)
}
// Invincibility
else if (K_PlayerAttackSteer(thing, side, 20,
globalsmuggle.botmo->player->ktemp_invincibilitytimer,
thing->player->ktemp_invincibilitytimer
globalsmuggle.botmo->player->invincibilitytimer,
thing->player->invincibilitytimer
))
{
break;
}
// Thunder Shield
else if (K_PlayerAttackSteer(thing, side, 20,
globalsmuggle.botmo->player->ktemp_itemtype == KITEM_THUNDERSHIELD,
thing->player->ktemp_itemtype == KITEM_THUNDERSHIELD
globalsmuggle.botmo->player->itemtype == KITEM_THUNDERSHIELD,
thing->player->itemtype == KITEM_THUNDERSHIELD
))
{
break;
}
// Bubble Shield
else if (K_PlayerAttackSteer(thing, side, 20,
globalsmuggle.botmo->player->ktemp_itemtype == KITEM_BUBBLESHIELD,
thing->player->ktemp_itemtype == KITEM_BUBBLESHIELD
globalsmuggle.botmo->player->itemtype == KITEM_BUBBLESHIELD,
thing->player->itemtype == KITEM_BUBBLESHIELD
))
{
break;
}
// Flame Shield
else if (K_PlayerAttackSteer(thing, side, 20,
globalsmuggle.botmo->player->ktemp_itemtype == KITEM_FLAMESHIELD,
thing->player->ktemp_itemtype == KITEM_FLAMESHIELD
globalsmuggle.botmo->player->itemtype == KITEM_FLAMESHIELD,
thing->player->itemtype == KITEM_FLAMESHIELD
))
{
break;

View file

@ -30,14 +30,14 @@ boolean K_OrbinautJawzCollide(mobj_t *t1, mobj_t *t2)
if (t2->player)
{
if ((t2->player->ktemp_flashing > 0 && t2->hitlag == 0)
if ((t2->player->flashing > 0 && t2->hitlag == 0)
&& !(t1->type == MT_ORBINAUT || t1->type == MT_JAWZ || t1->type == MT_JAWZ_DUD))
return true;
if (t2->player->ktemp_hyudorotimer)
if (t2->player->hyudorotimer)
return true; // no interaction
if (t2->player->ktemp_flamedash && t2->player->ktemp_itemtype == KITEM_FLAMESHIELD)
if (t2->player->flamedash && t2->player->itemtype == KITEM_FLAMESHIELD)
{
// Melt item
S_StartSound(t2, sfx_s3k43);
@ -123,14 +123,14 @@ boolean K_BananaBallhogCollide(mobj_t *t1, mobj_t *t2)
if (t2->player)
{
if (t2->player->ktemp_flashing > 0 && t2->hitlag == 0)
if (t2->player->flashing > 0 && t2->hitlag == 0)
return true;
// Banana snipe!
if (t1->type == MT_BANANA && t1->health > 1)
S_StartSound(t2, sfx_bsnipe);
if (t2->player->ktemp_flamedash && t2->player->ktemp_itemtype == KITEM_FLAMESHIELD)
if (t2->player->flamedash && t2->player->itemtype == KITEM_FLAMESHIELD)
{
// Melt item
S_StartSound(t2, sfx_s3k43);
@ -212,11 +212,11 @@ boolean K_EggItemCollide(mobj_t *t1, mobj_t *t2)
{
K_DropItems(t2->player); //K_StripItems(t2->player);
//K_StripOther(t2->player);
t2->player->ktemp_itemroulette = 1;
t2->player->ktemp_roulettetype = 2;
t2->player->itemroulette = 1;
t2->player->roulettetype = 2;
}
if (t2->player->ktemp_flamedash && t2->player->ktemp_itemtype == KITEM_FLAMESHIELD)
if (t2->player->flamedash && t2->player->itemtype == KITEM_FLAMESHIELD)
{
// Melt item
S_StartSound(t2, sfx_s3k43);
@ -237,9 +237,9 @@ boolean K_EggItemCollide(mobj_t *t1, mobj_t *t2)
if (t1->target && t1->target->player)
{
if ((gametyperules & GTR_CIRCUIT) || t1->target->player->bumpers > 0)
t2->player->ktemp_eggmanblame = t1->target->player-players;
t2->player->eggmanblame = t1->target->player-players;
else
t2->player->ktemp_eggmanblame = t2->player-players;
t2->player->eggmanblame = t2->player-players;
if (t1->target->hnext == t1)
{
@ -266,7 +266,7 @@ boolean K_MineCollide(mobj_t *t1, mobj_t *t2)
if (t2->player)
{
if (t2->player->ktemp_flashing > 0 && t2->hitlag == 0)
if (t2->player->flashing > 0 && t2->hitlag == 0)
return true;
// Bomb punting
@ -308,7 +308,7 @@ boolean K_MineExplosionCollide(mobj_t *t1, mobj_t *t2)
{
if (t2->player)
{
if (t2->player->ktemp_flashing > 0 && t2->hitlag == 0)
if (t2->player->flashing > 0 && t2->hitlag == 0)
return true;
if (t1->state == &states[S_MINEEXPLOSION1])
@ -339,14 +339,14 @@ boolean K_LandMineCollide(mobj_t *t1, mobj_t *t2)
if (t2->player)
{
if (t2->player->ktemp_flashing)
if (t2->player->flashing)
return true;
// Banana snipe!
if (t1->health > 1)
S_StartSound(t2, sfx_bsnipe);
if (t2->player->ktemp_flamedash && t2->player->ktemp_itemtype == KITEM_FLAMESHIELD)
if (t2->player->flamedash && t2->player->itemtype == KITEM_FLAMESHIELD)
{
// Melt item
S_StartSound(t2, sfx_s3k43);
@ -403,7 +403,7 @@ boolean K_KitchenSinkCollide(mobj_t *t1, mobj_t *t2)
if (t2->player)
{
if (t2->player->ktemp_flashing > 0 && t2->hitlag == 0)
if (t2->player->flashing > 0 && t2->hitlag == 0)
return true;
S_StartSound(NULL, sfx_bsnipe); // let all players hear it.
@ -452,8 +452,8 @@ boolean K_SMKIceBlockCollide(mobj_t *t1, mobj_t *t2)
P_KillMobj(t1, t2, t2, DMG_NORMAL);
/*
if (t2->player && (t2->player->ktemp_invincibilitytimer > 0
|| t2->player->ktemp_growshrinktimer > 0))
if (t2->player && (t2->player->invincibilitytimer > 0
|| t2->player->growshrinktimer > 0))
return true;
*/
@ -483,8 +483,8 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
}
// Invincibility damage
t1Condition = (t1->player->ktemp_invincibilitytimer > 0);
t2Condition = (t2->player->ktemp_invincibilitytimer > 0);
t1Condition = (t1->player->invincibilitytimer > 0);
t2Condition = (t2->player->invincibilitytimer > 0);
if (t1Condition == true && t2Condition == false)
{
@ -498,8 +498,8 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
}
// Flame Shield dash damage
t1Condition = (t1->player->ktemp_flamedash > 0 && t1->player->ktemp_itemtype == KITEM_FLAMESHIELD);
t2Condition = (t2->player->ktemp_flamedash > 0 && t2->player->ktemp_itemtype == KITEM_FLAMESHIELD);
t1Condition = (t1->player->flamedash > 0 && t1->player->itemtype == KITEM_FLAMESHIELD);
t2Condition = (t2->player->flamedash > 0 && t2->player->itemtype == KITEM_FLAMESHIELD);
if (t1Condition == true && t2Condition == false)
{
@ -516,8 +516,8 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
// (Pogo Spring damage is handled in head-stomping code)
if (gametyperules & GTR_BUMPERS)
{
t1Condition = (t1->player->ktemp_sneakertimer > 0 && t1->player->ktemp_flashing != 0);
t2Condition = (t2->player->ktemp_sneakertimer > 0 && t2->player->ktemp_flashing != 0);
t1Condition = (t1->player->sneakertimer > 0 && t1->player->flashing != 0);
t2Condition = (t2->player->sneakertimer > 0 && t2->player->flashing != 0);
if (t1Condition == true && t2Condition == false)
{
@ -532,8 +532,8 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
}
// Ring sting, this is a bit more unique
t1Condition = (K_GetShieldFromItem(t2->player->ktemp_itemtype) == KSHIELD_NONE);
t2Condition = (K_GetShieldFromItem(t1->player->ktemp_itemtype) == KSHIELD_NONE);
t1Condition = (K_GetShieldFromItem(t2->player->itemtype) == KSHIELD_NONE);
t2Condition = (K_GetShieldFromItem(t1->player->itemtype) == KSHIELD_NONE);
if (t1Condition == true)
{

View file

@ -472,7 +472,7 @@ void K_IncreaseBotDifficulty(player_t *bot)
// Increment bot difficulty based on what position you were meant to come in!
expectedstanding = K_BotExpectedStanding(bot);
standingdiff = expectedstanding - bot->ktemp_position;
standingdiff = expectedstanding - bot->position;
if (standingdiff >= -2)
{

View file

@ -1045,7 +1045,7 @@ static void K_drawKartItem(void)
patch_t *localbg = ((offset) ? kp_itembg[2] : kp_itembg[0]);
patch_t *localinv = ((offset) ? kp_invincibility[((leveltime % (6*3)) / 3) + 7] : kp_invincibility[(leveltime % (7*3)) / 3]);
INT32 fx = 0, fy = 0, fflags = 0; // final coords for hud and flags...
const INT32 numberdisplaymin = ((!offset && stplyr->ktemp_itemtype == KITEM_ORBINAUT) ? 5 : 2);
const INT32 numberdisplaymin = ((!offset && stplyr->itemtype == KITEM_ORBINAUT) ? 5 : 2);
INT32 itembar = 0;
INT32 maxl = 0; // itembar's normal highest value
const INT32 barlength = (r_splitscreen > 1 ? 12 : 26);
@ -1054,12 +1054,12 @@ static void K_drawKartItem(void)
UINT8 *colmap = NULL;
boolean flipamount = false; // Used for 3P/4P splitscreen to flip item amount stuff
if (stplyr->ktemp_itemroulette)
if (stplyr->itemroulette)
{
if (stplyr->skincolor)
localcolor = stplyr->skincolor;
switch((stplyr->ktemp_itemroulette % (15*3)) / 3)
switch((stplyr->itemroulette % (15*3)) / 3)
{
// Each case is handled in threes, to give three frames of in-game time to see the item on the roulette
case 0: // Sneaker
@ -1144,27 +1144,27 @@ static void K_drawKartItem(void)
// The only actual reason is to make sneakers line up this way in the code below
// This shouldn't have any actual baring over how it functions
// Hyudoro is first, because we're drawing it on top of the player's current item
if (stplyr->ktemp_stealingtimer < 0)
if (stplyr->stealingtimer < 0)
{
if (leveltime & 2)
localpatch = kp_hyudoro[offset];
else
localpatch = kp_nodraw;
}
else if ((stplyr->ktemp_stealingtimer > 0) && (leveltime & 2))
else if ((stplyr->stealingtimer > 0) && (leveltime & 2))
{
localpatch = kp_hyudoro[offset];
}
else if (stplyr->ktemp_eggmanexplode > 1)
else if (stplyr->eggmanexplode > 1)
{
if (leveltime & 1)
localpatch = kp_eggman[offset];
else
localpatch = kp_nodraw;
}
else if (stplyr->ktemp_rocketsneakertimer > 1)
else if (stplyr->rocketsneakertimer > 1)
{
itembar = stplyr->ktemp_rocketsneakertimer;
itembar = stplyr->rocketsneakertimer;
maxl = (itemtime*3) - barlength;
if (leveltime & 1)
@ -1172,7 +1172,7 @@ static void K_drawKartItem(void)
else
localpatch = kp_nodraw;
}
else if (stplyr->ktemp_sadtimer > 0)
else if (stplyr->sadtimer > 0)
{
if (leveltime & 2)
localpatch = kp_sadface[offset];
@ -1181,10 +1181,10 @@ static void K_drawKartItem(void)
}
else
{
if (stplyr->ktemp_itemamount <= 0)
if (stplyr->itemamount <= 0)
return;
switch(stplyr->ktemp_itemtype)
switch(stplyr->itemtype)
{
case KITEM_SNEAKER:
localpatch = kp_sneaker[offset];
@ -1203,7 +1203,7 @@ static void K_drawKartItem(void)
localpatch = kp_eggman[offset];
break;
case KITEM_ORBINAUT:
localpatch = kp_orbinaut[(offset ? 4 : min(stplyr->ktemp_itemamount-1, 3))];
localpatch = kp_orbinaut[(offset ? 4 : min(stplyr->itemamount-1, 3))];
break;
case KITEM_JAWZ:
localpatch = kp_jawz[offset];
@ -1311,19 +1311,19 @@ static void K_drawKartItem(void)
V_DrawScaledPatch(fx, fy, V_HUDTRANS|V_SLIDEIN|fflags, localbg);
// Then, the numbers:
if (stplyr->ktemp_itemamount >= numberdisplaymin && !stplyr->ktemp_itemroulette)
if (stplyr->itemamount >= numberdisplaymin && !stplyr->itemroulette)
{
V_DrawScaledPatch(fx + (flipamount ? 48 : 0), fy, V_HUDTRANS|V_SLIDEIN|fflags|(flipamount ? V_FLIP : 0), kp_itemmulsticker[offset]); // flip this graphic for p2 and p4 in split and shift it.
V_DrawFixedPatch(fx<<FRACBITS, fy<<FRACBITS, FRACUNIT, V_HUDTRANS|V_SLIDEIN|fflags, localpatch, colmap);
if (offset)
if (flipamount) // reminder that this is for 3/4p's right end of the screen.
V_DrawString(fx+2, fy+31, V_ALLOWLOWERCASE|V_HUDTRANS|V_SLIDEIN|fflags, va("x%d", stplyr->ktemp_itemamount));
V_DrawString(fx+2, fy+31, V_ALLOWLOWERCASE|V_HUDTRANS|V_SLIDEIN|fflags, va("x%d", stplyr->itemamount));
else
V_DrawString(fx+24, fy+31, V_ALLOWLOWERCASE|V_HUDTRANS|V_SLIDEIN|fflags, va("x%d", stplyr->ktemp_itemamount));
V_DrawString(fx+24, fy+31, V_ALLOWLOWERCASE|V_HUDTRANS|V_SLIDEIN|fflags, va("x%d", stplyr->itemamount));
else
{
V_DrawScaledPatch(fy+28, fy+41, V_HUDTRANS|V_SLIDEIN|fflags, kp_itemx);
V_DrawKartString(fx+38, fy+36, V_HUDTRANS|V_SLIDEIN|fflags, va("%d", stplyr->ktemp_itemamount));
V_DrawKartString(fx+38, fy+36, V_HUDTRANS|V_SLIDEIN|fflags, va("%d", stplyr->itemamount));
}
}
else
@ -1351,17 +1351,17 @@ static void K_drawKartItem(void)
}
// Quick Eggman numbers
if (stplyr->ktemp_eggmanexplode > 1)
V_DrawScaledPatch(fx+17, fy+13-offset, V_HUDTRANS|V_SLIDEIN|fflags, kp_eggnum[min(3, G_TicsToSeconds(stplyr->ktemp_eggmanexplode))]);
if (stplyr->eggmanexplode > 1)
V_DrawScaledPatch(fx+17, fy+13-offset, V_HUDTRANS|V_SLIDEIN|fflags, kp_eggnum[min(3, G_TicsToSeconds(stplyr->eggmanexplode))]);
if (stplyr->ktemp_itemtype == KITEM_FLAMESHIELD && stplyr->ktemp_flamelength > 0)
if (stplyr->itemtype == KITEM_FLAMESHIELD && stplyr->flamelength > 0)
{
INT32 numframes = 104;
INT32 absolutemax = 16 * flameseg;
INT32 flamemax = stplyr->ktemp_flamelength * flameseg;
INT32 flamemeter = min(stplyr->ktemp_flamemeter, flamemax);
INT32 flamemax = stplyr->flamelength * flameseg;
INT32 flamemeter = min(stplyr->flamemeter, flamemax);
INT32 bf = 16 - stplyr->ktemp_flamelength;
INT32 bf = 16 - stplyr->flamelength;
INT32 ff = numframes - ((flamemeter * numframes) / absolutemax);
INT32 fmin = (8 * (bf-1));
@ -1385,9 +1385,9 @@ static void K_drawKartItem(void)
if (bf >= 0 && bf < 16)
V_DrawScaledPatch(fx-xo, fy-yo, V_HUDTRANS|V_SLIDEIN|fflags|flip, kp_flameshieldmeter_bg[bf][offset]);
if (ff >= 0 && ff < numframes && stplyr->ktemp_flamemeter > 0)
if (ff >= 0 && ff < numframes && stplyr->flamemeter > 0)
{
if ((stplyr->ktemp_flamemeter > flamemax) && (leveltime & 1))
if ((stplyr->flamemeter > flamemax) && (leveltime & 1))
{
UINT8 *fsflash = R_GetTranslationColormap(TC_BLINK, SKINCOLOR_WHITE, GTC_CACHE);
V_DrawMappedPatch(fx-xo, fy-yo, V_HUDTRANS|V_SLIDEIN|fflags|flip, kp_flameshieldmeter[ff][offset], fsflash);
@ -1572,7 +1572,7 @@ static void K_DrawKartPositionNum(INT32 num)
addOrSub = V_SUBTRACT;
}
if (stplyr->ktemp_positiondelay || stplyr->exiting)
if (stplyr->positiondelay || stplyr->exiting)
{
scale *= 2;
overtake = true; // this is used for splitscreen stuff in conjunction with flipdraw.
@ -1735,11 +1735,11 @@ static boolean K_drawKartPositionFaces(void)
if (completed[i] || !playeringame[i] || players[i].spectator || !players[i].mo)
continue;
if (players[i].ktemp_position >= lowestposition)
if (players[i].position >= lowestposition)
continue;
rankplayer[ranklines] = i;
lowestposition = players[i].ktemp_position;
lowestposition = players[i].position;
}
i = rankplayer[ranklines];
@ -1816,7 +1816,7 @@ static boolean K_drawKartPositionFaces(void)
UINT32 emeraldFlag = (1 << j);
UINT16 emeraldColor = SKINCOLOR_CHAOSEMERALD1 + j;
if (players[rankplayer[i]].ktemp_emeralds & emeraldFlag)
if (players[rankplayer[i]].emeralds & emeraldFlag)
{
colormap = R_GetTranslationColormap(TC_DEFAULT, emeraldColor, GTC_CACHE);
V_DrawMappedPatch(emeraldx, Y+7, V_HUDTRANS|V_SLIDEIN|V_SNAPTOLEFT, kp_rankemerald, colormap);
@ -1831,7 +1831,7 @@ static boolean K_drawKartPositionFaces(void)
V_DrawScaledPatch(FACE_X-4, Y-3, V_HUDTRANS|V_SLIDEIN|V_SNAPTOLEFT, kp_ranknobumpers);
else
{
INT32 pos = players[rankplayer[i]].ktemp_position;
INT32 pos = players[rankplayer[i]].position;
if (pos < 0 || pos > MAXPLAYERS)
pos = 0;
// Draws the little number over the face
@ -1868,7 +1868,7 @@ static void K_drawKartEmeralds(void)
UINT32 emeraldFlag = (1 << i);
UINT16 emeraldColor = SKINCOLOR_CHAOSEMERALD1 + i;
if (stplyr->ktemp_emeralds & emeraldFlag)
if (stplyr->emeralds & emeraldFlag)
{
boolean whiteFlash = (leveltime & 1);
UINT8 *colormap;
@ -1997,7 +1997,7 @@ void K_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, IN
V_DrawScaledPatch(x-4, y-7, 0, kp_ranknobumpers);
else
{
INT32 pos = players[tab[i].num].ktemp_position;
INT32 pos = players[tab[i].num].position;
if (pos < 0 || pos > MAXPLAYERS)
pos = 0;
// Draws the little number over the face
@ -2602,16 +2602,16 @@ static void K_drawKartPlayerCheck(void)
continue;
}
if ((checkplayer->ktemp_invincibilitytimer <= 0) && (leveltime & 2))
if ((checkplayer->invincibilitytimer <= 0) && (leveltime & 2))
{
pnum++; // white frames
}
if (checkplayer->ktemp_itemtype == KITEM_GROW || checkplayer->ktemp_growshrinktimer > 0)
if (checkplayer->itemtype == KITEM_GROW || checkplayer->growshrinktimer > 0)
{
pnum += 4;
}
else if (checkplayer->ktemp_itemtype == KITEM_INVINCIBILITY || checkplayer->ktemp_invincibilitytimer)
else if (checkplayer->itemtype == KITEM_INVINCIBILITY || checkplayer->invincibilitytimer)
{
pnum += 2;
}
@ -2645,8 +2645,8 @@ static boolean K_ShowPlayerNametag(player_t *p)
if (gametyperules & GTR_CIRCUIT)
{
if ((p->ktemp_position < stplyr->ktemp_position-2)
|| (p->ktemp_position > stplyr->ktemp_position+2))
if ((p->position < stplyr->position-2)
|| (p->position > stplyr->position+2))
{
return false;
}
@ -3144,10 +3144,10 @@ static void K_drawKartMinimap(void)
if (gametype == GT_BATTLE && players[i].bumpers <= 0)
continue;
if (players[i].ktemp_hyudorotimer > 0)
if (players[i].hyudorotimer > 0)
{
if (!((players[i].ktemp_hyudorotimer < TICRATE/2
|| players[i].ktemp_hyudorotimer > hyu-(TICRATE/2))
if (!((players[i].hyudorotimer < TICRATE/2
|| players[i].hyudorotimer > hyu-(TICRATE/2))
&& !(leveltime & 1)))
continue;
}
@ -3178,7 +3178,7 @@ static void K_drawKartMinimap(void)
K_drawKartMinimapIcon(players[i].mo->x, players[i].mo->y, x, y, splitflags, faceprefix[skin][FACE_MINIMAP], colormap, AutomapPic);
// Target reticule
if ((gametype == GT_RACE && players[i].ktemp_position == spbplace)
if ((gametype == GT_RACE && players[i].position == spbplace)
|| (gametype == GT_BATTLE && K_IsPlayerWanted(&players[i])))
K_drawKartMinimapIcon(players[i].mo->x, players[i].mo->y, x, y, splitflags, kp_wantedreticle, NULL, AutomapPic);
}
@ -3231,7 +3231,7 @@ static void K_drawKartMinimap(void)
K_drawKartMinimapIcon(players[localplayers[i]].mo->x, players[localplayers[i]].mo->y, x, y, splitflags, faceprefix[skin][FACE_MINIMAP], colormap, AutomapPic);
// Target reticule
if ((gametype == GT_RACE && players[localplayers[i]].ktemp_position == spbplace)
if ((gametype == GT_RACE && players[localplayers[i]].position == spbplace)
|| (gametype == GT_BATTLE && K_IsPlayerWanted(&players[localplayers[i]])))
K_drawKartMinimapIcon(players[localplayers[i]].mo->x, players[localplayers[i]].mo->y, x, y, splitflags, kp_wantedreticle, NULL, AutomapPic);
}
@ -3569,7 +3569,7 @@ static void K_drawBattleFullscreen(void)
if (K_IsPlayerLosing(stplyr))
p = kp_battlelose;
else if (stplyr->ktemp_position == 1)
else if (stplyr->position == 1)
p = kp_battlewin;
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, p, NULL);
@ -3706,8 +3706,8 @@ static void K_drawKartFirstPerson(void)
if (tn != stplyr->steering/50)
tn -= (tn - (stplyr->steering/50))/8;
if (dr != stplyr->ktemp_drift*16)
dr -= (dr - (stplyr->ktemp_drift*16))/8;
if (dr != stplyr->drift*16)
dr -= (dr - (stplyr->drift*16))/8;
if (r_splitscreen == 1)
{
@ -3721,7 +3721,7 @@ static void K_drawKartFirstPerson(void)
if (stplyr->mo)
{
UINT8 driftcolor = K_DriftSparkColor(stplyr, stplyr->ktemp_driftcharge);
UINT8 driftcolor = K_DriftSparkColor(stplyr, stplyr->driftcharge);
const angle_t ang = R_PointToAngle2(0, 0, stplyr->rmomx, stplyr->rmomy) - stplyr->drawangle;
// yes, the following is correct. no, you do not need to swap the x and y.
fixed_t xoffs = -P_ReturnThrustY(stplyr->mo, ang, (BASEVIDWIDTH<<(FRACBITS-2))/2);
@ -4054,7 +4054,7 @@ static void K_drawDistributionDebugger(void)
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && !players[i].spectator
&& players[i].ktemp_position == 1)
&& players[i].position == 1)
{
// This player is first! Yay!
pdis = stplyr->distancetofinish - players[i].distancetofinish;
@ -4065,7 +4065,7 @@ static void K_drawDistributionDebugger(void)
if (franticitems) // Frantic items make the distances between everyone artifically higher, for crazier items
pdis = (15 * pdis) / 14;
if (spbplace != -1 && stplyr->ktemp_position == spbplace+1) // SPB Rush Mode: It's 2nd place's job to catch-up items and make 1st place's job hell
if (spbplace != -1 && stplyr->position == spbplace+1) // SPB Rush Mode: It's 2nd place's job to catch-up items and make 1st place's job hell
{
pdis = (3 * pdis) / 2;
spbrush = true;
@ -4255,7 +4255,7 @@ void K_drawKartHUD(void)
{
// Draw the numerical position
if (LUA_HudEnabled(hud_position))
K_DrawKartPositionNum(stplyr->ktemp_position);
K_DrawKartPositionNum(stplyr->position);
}
else //if (!(demo.playback && hu_showscores))
{

File diff suppressed because it is too large Load diff

View file

@ -113,7 +113,7 @@ static void K_RespawnAtWaypoint(player_t *player, waypoint_t *waypoint)
void K_DoFault(player_t *player)
{
player->ktemp_nocontrol = (starttime - leveltime) + 50;
player->nocontrol = (starttime - leveltime) + 50;
if (!(player->pflags & PF_FAULT))
{
S_StartSound(player->mo, sfx_s3k83);
@ -149,8 +149,8 @@ void K_DoIngameRespawn(player_t *player)
if (leveltime < starttime)
K_DoFault(player);
player->ktemp_ringboost = 0;
player->ktemp_driftboost = 0;
player->ringboost = 0;
player->driftboost = 0;
// If player was tumbling, set variables so that they don't tumble like crazy after they're done respawning
if (player->tumbleBounces > 0)
@ -329,8 +329,8 @@ static void K_MovePlayerToRespawnPoint(player_t *player)
player->mo->momx = player->mo->momy = player->mo->momz = 0;
player->ktemp_flashing = 2;
player->ktemp_nocontrol = max(2, player->ktemp_nocontrol);
player->flashing = 2;
player->nocontrol = max(2, player->nocontrol);
if (leveltime % 8 == 0 && !mapreset)
{
@ -589,7 +589,7 @@ static void K_MovePlayerToRespawnPoint(player_t *player)
--------------------------------------------------*/
static void K_DropDashWait(player_t *player)
{
if (player->ktemp_nocontrol == 0)
if (player->nocontrol == 0)
player->respawn.timer--;
if (leveltime % 8 == 0)
@ -656,7 +656,7 @@ static void K_HandleDropDash(player_t *player)
{
const UINT16 buttons = K_GetKartButtons(player);
if (player->ktemp_growshrinktimer < 0)
if (player->growshrinktimer < 0)
{
player->mo->scalespeed = mapobjectscale/TICRATE;
player->mo->destscale = (6*mapobjectscale)/8;
@ -674,12 +674,12 @@ static void K_HandleDropDash(player_t *player)
return;
}
player->ktemp_flashing = K_GetKartFlashing(player);
player->flashing = K_GetKartFlashing(player);
// The old behavior was stupid and prone to accidental usage.
// Let's rip off Mania instead, and turn this into a Drop Dash!
if ((buttons & BT_ACCELERATE) && !player->ktemp_spinouttimer) // Since we're letting players spin out on respawn, don't let them charge a dropdash in this state. (It wouldn't work anyway)
if ((buttons & BT_ACCELERATE) && !player->spinouttimer) // Since we're letting players spin out on respawn, don't let them charge a dropdash in this state. (It wouldn't work anyway)
{
player->respawn.dropdash++;
}
@ -707,7 +707,7 @@ static void K_HandleDropDash(player_t *player)
if ((buttons & BT_ACCELERATE) && (player->respawn.dropdash >= TICRATE/4))
{
S_StartSound(player->mo, sfx_s23c);
player->ktemp_startboost = 50;
player->startboost = 50;
K_SpawnDashDustRelease(player);
}

View file

@ -208,146 +208,146 @@ static int player_get(lua_State *L)
lua_pushangle(L, plr->drawangle);
else if (fastcmp(field,"karthud"))
LUA_PushUserdata(L, plr->karthud, META_KARTHUD);
else if (fastcmp(field,"ktemp_nocontrol"))
lua_pushinteger(L, plr->ktemp_nocontrol);
else if (fastcmp(field,"ktemp_carry"))
lua_pushinteger(L, plr->ktemp_carry);
else if (fastcmp(field,"ktemp_dye"))
lua_pushinteger(L, plr->ktemp_dye);
else if (fastcmp(field,"ktemp_position"))
lua_pushinteger(L, plr->ktemp_position);
else if (fastcmp(field,"ktemp_oldposition"))
lua_pushinteger(L, plr->ktemp_oldposition);
else if (fastcmp(field,"ktemp_positiondelay"))
lua_pushinteger(L, plr->ktemp_positiondelay);
else if (fastcmp(field,"nocontrol"))
lua_pushinteger(L, plr->nocontrol);
else if (fastcmp(field,"carry"))
lua_pushinteger(L, plr->carry);
else if (fastcmp(field,"dye"))
lua_pushinteger(L, plr->dye);
else if (fastcmp(field,"position"))
lua_pushinteger(L, plr->position);
else if (fastcmp(field,"oldposition"))
lua_pushinteger(L, plr->oldposition);
else if (fastcmp(field,"positiondelay"))
lua_pushinteger(L, plr->positiondelay);
else if (fastcmp(field,"distancetofinish"))
lua_pushinteger(L, plr->distancetofinish);
else if (fastcmp(field,"airtime"))
lua_pushinteger(L, plr->airtime);
else if (fastcmp(field,"ktemp_flashing"))
lua_pushinteger(L, plr->ktemp_flashing);
else if (fastcmp(field,"ktemp_spinouttimer"))
lua_pushinteger(L, plr->ktemp_spinouttimer);
else if (fastcmp(field,"ktemp_instashield"))
lua_pushinteger(L, plr->ktemp_instashield);
else if (fastcmp(field,"ktemp_wipeoutslow"))
lua_pushinteger(L, plr->ktemp_wipeoutslow);
else if (fastcmp(field,"ktemp_justbumped"))
lua_pushinteger(L, plr->ktemp_justbumped);
else if (fastcmp(field,"flashing"))
lua_pushinteger(L, plr->flashing);
else if (fastcmp(field,"spinouttimer"))
lua_pushinteger(L, plr->spinouttimer);
else if (fastcmp(field,"instashield"))
lua_pushinteger(L, plr->instashield);
else if (fastcmp(field,"wipeoutslow"))
lua_pushinteger(L, plr->wipeoutslow);
else if (fastcmp(field,"justbumped"))
lua_pushinteger(L, plr->justbumped);
else if (fastcmp(field,"tumbleBounces"))
lua_pushinteger(L, plr->tumbleBounces);
else if (fastcmp(field,"tumbleHeight"))
lua_pushinteger(L, plr->tumbleHeight);
else if (fastcmp(field,"ktemp_drift"))
lua_pushinteger(L, plr->ktemp_drift);
else if (fastcmp(field,"ktemp_driftcharge"))
lua_pushinteger(L, plr->ktemp_driftcharge);
else if (fastcmp(field,"ktemp_driftboost"))
lua_pushinteger(L, plr->ktemp_driftboost);
else if (fastcmp(field,"ktemp_aizdriftstraft"))
lua_pushinteger(L, plr->ktemp_aizdriftstrat);
else if (fastcmp(field,"drift"))
lua_pushinteger(L, plr->drift);
else if (fastcmp(field,"driftcharge"))
lua_pushinteger(L, plr->driftcharge);
else if (fastcmp(field,"driftboost"))
lua_pushinteger(L, plr->driftboost);
else if (fastcmp(field,"aizdriftstraft"))
lua_pushinteger(L, plr->aizdriftstrat);
else if (fastcmp(field,"aizdrifttilt"))
lua_pushinteger(L, plr->aizdrifttilt);
else if (fastcmp(field,"aizdriftturn"))
lua_pushinteger(L, plr->aizdriftturn);
else if (fastcmp(field,"ktemp_offroad"))
lua_pushinteger(L, plr->ktemp_offroad);
else if (fastcmp(field,"ktemp_waterskip"))
lua_pushinteger(L, plr->ktemp_waterskip);
else if (fastcmp(field,"ktemp_tiregrease"))
lua_pushinteger(L, plr->ktemp_tiregrease);
else if (fastcmp(field,"ktemp_springstars"))
lua_pushinteger(L, plr->ktemp_springstars);
else if (fastcmp(field,"ktemp_springcolor"))
lua_pushinteger(L, plr->ktemp_springcolor);
else if (fastcmp(field,"ktemp_dashpadcooldown"))
lua_pushinteger(L, plr->ktemp_dashpadcooldown);
else if (fastcmp(field,"ktemp_spindash"))
lua_pushinteger(L, plr->ktemp_spindash);
else if (fastcmp(field,"ktemp_spindashspeed"))
lua_pushinteger(L, plr->ktemp_spindashspeed);
else if (fastcmp(field,"ktemp_spindashboost"))
lua_pushinteger(L, plr->ktemp_spindashboost);
else if (fastcmp(field,"ktemp_numboosts"))
lua_pushinteger(L, plr->ktemp_numboosts);
else if (fastcmp(field,"ktemp_boostpower"))
lua_pushinteger(L, plr->ktemp_boostpower);
else if (fastcmp(field,"ktemp_speedboost"))
lua_pushinteger(L, plr->ktemp_speedboost);
else if (fastcmp(field,"ktemp_accelboost"))
lua_pushinteger(L, plr->ktemp_accelboost);
else if (fastcmp(field,"ktemp_handleboost"))
lua_pushinteger(L, plr->ktemp_handleboost);
else if (fastcmp(field,"ktemp_boostangle"))
lua_pushinteger(L, plr->ktemp_boostangle);
else if (fastcmp(field,"ktemp_draftpower"))
lua_pushinteger(L, plr->ktemp_draftpower);
else if (fastcmp(field,"ktemp_draftleeway"))
lua_pushinteger(L, plr->ktemp_draftleeway);
else if (fastcmp(field,"ktemp_lastdraft"))
lua_pushinteger(L, plr->ktemp_lastdraft);
else if (fastcmp(field,"ktemp_itemroulette"))
lua_pushinteger(L, plr->ktemp_itemroulette);
else if (fastcmp(field,"ktemp_roulettetype"))
lua_pushinteger(L, plr->ktemp_roulettetype);
else if (fastcmp(field,"ktemp_itemtype"))
lua_pushinteger(L, plr->ktemp_itemtype);
else if (fastcmp(field,"ktemp_itemamount"))
lua_pushinteger(L, plr->ktemp_itemamount);
else if (fastcmp(field,"ktemp_throwdir"))
lua_pushinteger(L, plr->ktemp_throwdir);
else if (fastcmp(field,"ktemp_sadtimer"))
lua_pushinteger(L, plr->ktemp_sadtimer);
else if (fastcmp(field,"offroad"))
lua_pushinteger(L, plr->offroad);
else if (fastcmp(field,"waterskip"))
lua_pushinteger(L, plr->waterskip);
else if (fastcmp(field,"tiregrease"))
lua_pushinteger(L, plr->tiregrease);
else if (fastcmp(field,"springstars"))
lua_pushinteger(L, plr->springstars);
else if (fastcmp(field,"springcolor"))
lua_pushinteger(L, plr->springcolor);
else if (fastcmp(field,"dashpadcooldown"))
lua_pushinteger(L, plr->dashpadcooldown);
else if (fastcmp(field,"spindash"))
lua_pushinteger(L, plr->spindash);
else if (fastcmp(field,"spindashspeed"))
lua_pushinteger(L, plr->spindashspeed);
else if (fastcmp(field,"spindashboost"))
lua_pushinteger(L, plr->spindashboost);
else if (fastcmp(field,"numboosts"))
lua_pushinteger(L, plr->numboosts);
else if (fastcmp(field,"boostpower"))
lua_pushinteger(L, plr->boostpower);
else if (fastcmp(field,"speedboost"))
lua_pushinteger(L, plr->speedboost);
else if (fastcmp(field,"accelboost"))
lua_pushinteger(L, plr->accelboost);
else if (fastcmp(field,"handleboost"))
lua_pushinteger(L, plr->handleboost);
else if (fastcmp(field,"boostangle"))
lua_pushinteger(L, plr->boostangle);
else if (fastcmp(field,"draftpower"))
lua_pushinteger(L, plr->draftpower);
else if (fastcmp(field,"draftleeway"))
lua_pushinteger(L, plr->draftleeway);
else if (fastcmp(field,"lastdraft"))
lua_pushinteger(L, plr->lastdraft);
else if (fastcmp(field,"itemroulette"))
lua_pushinteger(L, plr->itemroulette);
else if (fastcmp(field,"roulettetype"))
lua_pushinteger(L, plr->roulettetype);
else if (fastcmp(field,"itemtype"))
lua_pushinteger(L, plr->itemtype);
else if (fastcmp(field,"itemamount"))
lua_pushinteger(L, plr->itemamount);
else if (fastcmp(field,"throwdir"))
lua_pushinteger(L, plr->throwdir);
else if (fastcmp(field,"sadtimer"))
lua_pushinteger(L, plr->sadtimer);
else if (fastcmp(field,"rings"))
lua_pushinteger(L, plr->rings);
else if (fastcmp(field,"ktemp_pickuprings"))
lua_pushinteger(L, plr->ktemp_pickuprings);
else if (fastcmp(field,"ktemp_ringdelay"))
lua_pushinteger(L, plr->ktemp_ringdelay);
else if (fastcmp(field,"ktemp_ringboost"))
lua_pushinteger(L, plr->ktemp_ringboost);
else if (fastcmp(field,"ktemp_sparkleanim"))
lua_pushinteger(L, plr->ktemp_sparkleanim);
else if (fastcmp(field,"ktemp_superring"))
lua_pushinteger(L, plr->ktemp_superring);
else if (fastcmp(field,"ktemp_curshield"))
lua_pushinteger(L, plr->ktemp_curshield);
else if (fastcmp(field,"ktemp_bubblecool"))
lua_pushinteger(L, plr->ktemp_bubblecool);
else if (fastcmp(field,"ktemp_bubbleblowup"))
lua_pushinteger(L, plr->ktemp_bubbleblowup);
else if (fastcmp(field,"ktemp_flamedash"))
lua_pushinteger(L, plr->ktemp_flamedash);
else if (fastcmp(field,"ktemp_flamemeter"))
lua_pushinteger(L, plr->ktemp_flamemeter);
else if (fastcmp(field,"ktemp_flamelength"))
lua_pushinteger(L, plr->ktemp_flamelength);
else if (fastcmp(field,"ktemp_hyudorotimer"))
lua_pushinteger(L, plr->ktemp_hyudorotimer);
else if (fastcmp(field,"ktemp_stealingtimer"))
lua_pushinteger(L, plr->ktemp_stealingtimer);
else if (fastcmp(field,"ktemp_sneakertimer"))
lua_pushinteger(L, plr->ktemp_sneakertimer);
else if (fastcmp(field,"ktemp_numsneakers"))
lua_pushinteger(L, plr->ktemp_numsneakers);
else if (fastcmp(field,"ktemp_floorboost"))
lua_pushinteger(L, plr->ktemp_floorboost);
else if (fastcmp(field,"ktemp_growshrinktimer"))
lua_pushinteger(L, plr->ktemp_growshrinktimer);
else if (fastcmp(field,"ktemp_rocketsneakertimer"))
lua_pushinteger(L, plr->ktemp_rocketsneakertimer);
else if (fastcmp(field,"ktemp_invincibilitytimer"))
lua_pushinteger(L, plr->ktemp_invincibilitytimer);
else if (fastcmp(field,"ktemp_eggmanexplode"))
lua_pushinteger(L, plr->ktemp_eggmanexplode);
else if (fastcmp(field,"ktemp_eggmanblame"))
lua_pushinteger(L, plr->ktemp_eggmanblame);
else if (fastcmp(field,"ktemp_bananadrag"))
lua_pushinteger(L, plr->ktemp_bananadrag);
else if (fastcmp(field,"ktemp_lastjawztarget"))
lua_pushinteger(L, plr->ktemp_lastjawztarget);
else if (fastcmp(field,"ktemp_jawztargetdelay"))
lua_pushinteger(L, plr->ktemp_jawztargetdelay);
else if (fastcmp(field,"pickuprings"))
lua_pushinteger(L, plr->pickuprings);
else if (fastcmp(field,"ringdelay"))
lua_pushinteger(L, plr->ringdelay);
else if (fastcmp(field,"ringboost"))
lua_pushinteger(L, plr->ringboost);
else if (fastcmp(field,"sparkleanim"))
lua_pushinteger(L, plr->sparkleanim);
else if (fastcmp(field,"superring"))
lua_pushinteger(L, plr->superring);
else if (fastcmp(field,"curshield"))
lua_pushinteger(L, plr->curshield);
else if (fastcmp(field,"bubblecool"))
lua_pushinteger(L, plr->bubblecool);
else if (fastcmp(field,"bubbleblowup"))
lua_pushinteger(L, plr->bubbleblowup);
else if (fastcmp(field,"flamedash"))
lua_pushinteger(L, plr->flamedash);
else if (fastcmp(field,"flamemeter"))
lua_pushinteger(L, plr->flamemeter);
else if (fastcmp(field,"flamelength"))
lua_pushinteger(L, plr->flamelength);
else if (fastcmp(field,"hyudorotimer"))
lua_pushinteger(L, plr->hyudorotimer);
else if (fastcmp(field,"stealingtimer"))
lua_pushinteger(L, plr->stealingtimer);
else if (fastcmp(field,"sneakertimer"))
lua_pushinteger(L, plr->sneakertimer);
else if (fastcmp(field,"numsneakers"))
lua_pushinteger(L, plr->numsneakers);
else if (fastcmp(field,"floorboost"))
lua_pushinteger(L, plr->floorboost);
else if (fastcmp(field,"growshrinktimer"))
lua_pushinteger(L, plr->growshrinktimer);
else if (fastcmp(field,"rocketsneakertimer"))
lua_pushinteger(L, plr->rocketsneakertimer);
else if (fastcmp(field,"invincibilitytimer"))
lua_pushinteger(L, plr->invincibilitytimer);
else if (fastcmp(field,"eggmanexplode"))
lua_pushinteger(L, plr->eggmanexplode);
else if (fastcmp(field,"eggmanblame"))
lua_pushinteger(L, plr->eggmanblame);
else if (fastcmp(field,"bananadrag"))
lua_pushinteger(L, plr->bananadrag);
else if (fastcmp(field,"lastjawztarget"))
lua_pushinteger(L, plr->lastjawztarget);
else if (fastcmp(field,"jawztargetdelay"))
lua_pushinteger(L, plr->jawztargetdelay);
else if (fastcmp(field,"glanceDir"))
lua_pushinteger(L, plr->glanceDir);
else if (fastcmp(field,"trickpanel"))
@ -360,8 +360,8 @@ static int player_get(lua_State *L)
lua_pushfixed(L, plr->trickmomz);
else if (fastcmp(field,"roundscore"))
plr->roundscore = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_emeralds"))
lua_pushinteger(L, plr->ktemp_emeralds);
else if (fastcmp(field,"emeralds"))
lua_pushinteger(L, plr->emeralds);
else if (fastcmp(field,"bumpers"))
lua_pushinteger(L, plr->bumpers);
else if (fastcmp(field,"karmadelay"))
@ -551,146 +551,146 @@ static int player_set(lua_State *L)
else if (fastcmp(field,"score"))
plr->score = luaL_checkinteger(L, 3);
// SRB2kart
else if (fastcmp(field,"ktemp_nocontrol"))
plr->ktemp_nocontrol = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_carry"))
plr->ktemp_carry = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_dye"))
plr->ktemp_dye = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_position"))
plr->ktemp_position = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_oldposition"))
plr->ktemp_oldposition = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_positiondelay"))
plr->ktemp_positiondelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"nocontrol"))
plr->nocontrol = luaL_checkinteger(L, 3);
else if (fastcmp(field,"carry"))
plr->carry = luaL_checkinteger(L, 3);
else if (fastcmp(field,"dye"))
plr->dye = luaL_checkinteger(L, 3);
else if (fastcmp(field,"position"))
plr->position = luaL_checkinteger(L, 3);
else if (fastcmp(field,"oldposition"))
plr->oldposition = luaL_checkinteger(L, 3);
else if (fastcmp(field,"positiondelay"))
plr->positiondelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"distancetofinish"))
return NOSET;
else if (fastcmp(field,"airtime"))
plr->airtime = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_flashing"))
plr->ktemp_flashing = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_spinouttimer"))
plr->ktemp_spinouttimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_instashield"))
plr->ktemp_instashield = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_wipeoutslow"))
plr->ktemp_wipeoutslow = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_justbumped"))
plr->ktemp_justbumped = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flashing"))
plr->flashing = luaL_checkinteger(L, 3);
else if (fastcmp(field,"spinouttimer"))
plr->spinouttimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"instashield"))
plr->instashield = luaL_checkinteger(L, 3);
else if (fastcmp(field,"wipeoutslow"))
plr->wipeoutslow = luaL_checkinteger(L, 3);
else if (fastcmp(field,"justbumped"))
plr->justbumped = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tumbleBounces"))
plr->tumbleBounces = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tumbleHeight"))
plr->tumbleHeight = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_drift"))
plr->ktemp_drift = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_driftcharge"))
plr->ktemp_driftcharge = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_driftboost"))
plr->ktemp_driftboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_aizdriftstraft"))
plr->ktemp_aizdriftstrat = luaL_checkinteger(L, 3);
else if (fastcmp(field,"drift"))
plr->drift = luaL_checkinteger(L, 3);
else if (fastcmp(field,"driftcharge"))
plr->driftcharge = luaL_checkinteger(L, 3);
else if (fastcmp(field,"driftboost"))
plr->driftboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"aizdriftstraft"))
plr->aizdriftstrat = luaL_checkinteger(L, 3);
else if (fastcmp(field,"aizdrifttilt"))
plr->aizdrifttilt = luaL_checkinteger(L, 3);
else if (fastcmp(field,"aizdriftturn"))
plr->aizdriftturn = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_offroad"))
plr->ktemp_offroad = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_waterskip"))
plr->ktemp_waterskip = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_tiregrease"))
plr->ktemp_tiregrease = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_springstars"))
plr->ktemp_springstars = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_springcolor"))
plr->ktemp_springcolor = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_dashpadcooldown"))
plr->ktemp_dashpadcooldown = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_spindash"))
plr->ktemp_spindash = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_spindashspeed"))
plr->ktemp_spindashspeed = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_spindashboost"))
plr->ktemp_spindashboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_numboosts"))
plr->ktemp_numboosts = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_boostpower"))
plr->ktemp_boostpower = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_speedboost"))
plr->ktemp_speedboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_accelboost"))
plr->ktemp_accelboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_handleboost"))
plr->ktemp_handleboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_boostangle"))
plr->ktemp_boostangle = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_draftpower"))
plr->ktemp_draftpower = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_draftleeway"))
plr->ktemp_draftleeway = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_lastdraft"))
plr->ktemp_lastdraft = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_itemroulette"))
plr->ktemp_itemroulette = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_roulettetype"))
plr->ktemp_roulettetype = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_itemtype"))
plr->ktemp_itemtype = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_itemamount"))
plr->ktemp_itemamount = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_throwdir"))
plr->ktemp_throwdir = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_sadtimer"))
plr->ktemp_sadtimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"offroad"))
plr->offroad = luaL_checkinteger(L, 3);
else if (fastcmp(field,"waterskip"))
plr->waterskip = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tiregrease"))
plr->tiregrease = luaL_checkinteger(L, 3);
else if (fastcmp(field,"springstars"))
plr->springstars = luaL_checkinteger(L, 3);
else if (fastcmp(field,"springcolor"))
plr->springcolor = luaL_checkinteger(L, 3);
else if (fastcmp(field,"dashpadcooldown"))
plr->dashpadcooldown = luaL_checkinteger(L, 3);
else if (fastcmp(field,"spindash"))
plr->spindash = luaL_checkinteger(L, 3);
else if (fastcmp(field,"spindashspeed"))
plr->spindashspeed = luaL_checkinteger(L, 3);
else if (fastcmp(field,"spindashboost"))
plr->spindashboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"numboosts"))
plr->numboosts = luaL_checkinteger(L, 3);
else if (fastcmp(field,"boostpower"))
plr->boostpower = luaL_checkinteger(L, 3);
else if (fastcmp(field,"speedboost"))
plr->speedboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"accelboost"))
plr->accelboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"handleboost"))
plr->handleboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"boostangle"))
plr->boostangle = luaL_checkinteger(L, 3);
else if (fastcmp(field,"draftpower"))
plr->draftpower = luaL_checkinteger(L, 3);
else if (fastcmp(field,"draftleeway"))
plr->draftleeway = luaL_checkinteger(L, 3);
else if (fastcmp(field,"lastdraft"))
plr->lastdraft = luaL_checkinteger(L, 3);
else if (fastcmp(field,"itemroulette"))
plr->itemroulette = luaL_checkinteger(L, 3);
else if (fastcmp(field,"roulettetype"))
plr->roulettetype = luaL_checkinteger(L, 3);
else if (fastcmp(field,"itemtype"))
plr->itemtype = luaL_checkinteger(L, 3);
else if (fastcmp(field,"itemamount"))
plr->itemamount = luaL_checkinteger(L, 3);
else if (fastcmp(field,"throwdir"))
plr->throwdir = luaL_checkinteger(L, 3);
else if (fastcmp(field,"sadtimer"))
plr->sadtimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"rings"))
plr->rings = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_pickuprings"))
plr->ktemp_pickuprings = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_ringdelay"))
plr->ktemp_ringdelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_ringboost"))
plr->ktemp_ringboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_sparkleanim"))
plr->ktemp_sparkleanim = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_superring"))
plr->ktemp_superring = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_curshield"))
plr->ktemp_curshield = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_bubblecool"))
plr->ktemp_bubblecool = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_bubbleblowup"))
plr->ktemp_bubbleblowup = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_flamedash"))
plr->ktemp_flamedash = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_flamemeter"))
plr->ktemp_flamemeter = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_flamelength"))
plr->ktemp_flamelength = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_hyudorotimer"))
plr->ktemp_hyudorotimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_stealingtimer"))
plr->ktemp_stealingtimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_sneakertimer"))
plr->ktemp_sneakertimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_numsneakers"))
plr->ktemp_numsneakers = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_floorboost"))
plr->ktemp_floorboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_growshrinktimer"))
plr->ktemp_growshrinktimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_rocketsneakertimer"))
plr->ktemp_rocketsneakertimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_invincibilitytimer"))
plr->ktemp_invincibilitytimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_eggmanexplode"))
plr->ktemp_eggmanexplode = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_eggmanblame"))
plr->ktemp_eggmanblame = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_bananadrag"))
plr->ktemp_bananadrag = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_lastjawztarget"))
plr->ktemp_lastjawztarget = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ktemp_jawztargetdelay"))
plr->ktemp_jawztargetdelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"pickuprings"))
plr->pickuprings = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ringdelay"))
plr->ringdelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"ringboost"))
plr->ringboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"sparkleanim"))
plr->sparkleanim = luaL_checkinteger(L, 3);
else if (fastcmp(field,"superring"))
plr->superring = luaL_checkinteger(L, 3);
else if (fastcmp(field,"curshield"))
plr->curshield = luaL_checkinteger(L, 3);
else if (fastcmp(field,"bubblecool"))
plr->bubblecool = luaL_checkinteger(L, 3);
else if (fastcmp(field,"bubbleblowup"))
plr->bubbleblowup = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flamedash"))
plr->flamedash = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flamemeter"))
plr->flamemeter = luaL_checkinteger(L, 3);
else if (fastcmp(field,"flamelength"))
plr->flamelength = luaL_checkinteger(L, 3);
else if (fastcmp(field,"hyudorotimer"))
plr->hyudorotimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"stealingtimer"))
plr->stealingtimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"sneakertimer"))
plr->sneakertimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"numsneakers"))
plr->numsneakers = luaL_checkinteger(L, 3);
else if (fastcmp(field,"floorboost"))
plr->floorboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"growshrinktimer"))
plr->growshrinktimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"rocketsneakertimer"))
plr->rocketsneakertimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"invincibilitytimer"))
plr->invincibilitytimer = luaL_checkinteger(L, 3);
else if (fastcmp(field,"eggmanexplode"))
plr->eggmanexplode = luaL_checkinteger(L, 3);
else if (fastcmp(field,"eggmanblame"))
plr->eggmanblame = luaL_checkinteger(L, 3);
else if (fastcmp(field,"bananadrag"))
plr->bananadrag = luaL_checkinteger(L, 3);
else if (fastcmp(field,"lastjawztarget"))
plr->lastjawztarget = luaL_checkinteger(L, 3);
else if (fastcmp(field,"jawztargetdelay"))
plr->jawztargetdelay = luaL_checkinteger(L, 3);
else if (fastcmp(field,"glanceDir"))
plr->glanceDir = luaL_checkinteger(L, 3);
else if (fastcmp(field,"trickpanel"))
@ -703,8 +703,8 @@ static int player_set(lua_State *L)
plr->trickmomz = luaL_checkfixed(L, 3);
else if (fastcmp(field,"roundscore"))
lua_pushinteger(L, plr->roundscore);
else if (fastcmp(field,"ktemp_emeralds"))
plr->ktemp_emeralds = luaL_checkinteger(L, 3);
else if (fastcmp(field,"emeralds"))
plr->emeralds = luaL_checkinteger(L, 3);
else if (fastcmp(field,"bumpers"))
plr->bumpers = luaL_checkinteger(L, 3);
else if (fastcmp(field,"karmadelay"))

View file

@ -1277,6 +1277,6 @@ void Command_ObjectPlace_f(void)
players[0].mo->color = op_oldcolor;
// This is necessary for recovery of dying players.
players[0].ktemp_flashing = K_GetKartFlashing(&players[0]);
players[0].flashing = K_GetKartFlashing(&players[0]);
}
}

View file

@ -4005,13 +4005,13 @@ void A_AttractChase(mobj_t *actor)
angle_t offset = FixedAngle(18<<FRACBITS);
// Base add is 3 tics for 9,9, adds 1 tic for each point closer to the 1,1 end
actor->target->player->ktemp_ringboost += K_GetKartRingPower(actor->target->player, true) + 3;
actor->target->player->ringboost += K_GetKartRingPower(actor->target->player, true) + 3;
S_StartSound(actor->target, sfx_s1b5);
sparkle = P_SpawnMobj(actor->target->x, actor->target->y, actor->target->z, MT_RINGSPARKS);
P_SetTarget(&sparkle->target, actor->target);
sparkle->angle = (actor->target->angle + (offset>>1)) + (offset * actor->target->player->ktemp_sparkleanim);
actor->target->player->ktemp_sparkleanim = (actor->target->player->ktemp_sparkleanim+1) % 20;
sparkle->angle = (actor->target->angle + (offset>>1)) + (offset * actor->target->player->sparkleanim);
actor->target->player->sparkleanim = (actor->target->player->sparkleanim+1) % 20;
P_KillMobj(actor, actor->target, actor->target, DMG_NORMAL);
return;
@ -4033,14 +4033,14 @@ void A_AttractChase(mobj_t *actor)
if (actor->extravalue1 >= 16)
{
if (!P_GivePlayerRings(actor->target->player, 1)) // returns 0 if addition failed
actor->target->player->ktemp_ringboost += K_GetKartRingPower(actor->target->player, true) + 3;
actor->target->player->ringboost += K_GetKartRingPower(actor->target->player, true) + 3;
if (actor->cvmem) // caching
S_StartSound(actor->target, sfx_s1c5);
else
S_StartSound(actor->target, sfx_s227);
actor->target->player->ktemp_pickuprings--;
actor->target->player->pickuprings--;
P_RemoveMobj(actor);
return;
}
@ -4089,7 +4089,7 @@ void A_AttractChase(mobj_t *actor)
if (actor->tracer && actor->tracer->player && actor->tracer->health
//&& P_CheckSight(actor, actor->tracer)
&& actor->tracer->player->ktemp_itemtype == KITEM_THUNDERSHIELD
&& actor->tracer->player->itemtype == KITEM_THUNDERSHIELD
&& RINGTOTAL(actor->tracer->player) < 20
&& !(actor->tracer->player->pflags & PF_RINGLOCK))
{
@ -5709,8 +5709,8 @@ void A_MixUp(mobj_t *actor)
players[two].speed = transspeed;
//set flags variables now but DON'T set them.
carry1 = players[one].ktemp_carry;
carry2 = players[two].ktemp_carry;
carry1 = players[one].carry;
carry2 = players[two].carry;
x = players[one].mo->x;
y = players[one].mo->y;
@ -5736,8 +5736,8 @@ void A_MixUp(mobj_t *actor)
//carry set after mixup. Stupid P_ResetPlayer() takes away some of the stuff we look for...
//but not all of it! So we need to make sure they aren't set wrong or anything.
players[one].ktemp_carry = carry2;
players[two].ktemp_carry = carry1;
players[one].carry = carry2;
players[two].carry = carry1;
teleported[one] = true;
teleported[two] = true;
@ -5784,7 +5784,7 @@ void A_MixUp(mobj_t *actor)
players[i].rmomx = players[i].rmomy = 1;
players[i].cmomx = players[i].cmomy = 0;
transcarry[counter] = players[i].ktemp_carry;
transcarry[counter] = players[i].carry;
transspeed[counter] = players[i].speed;
transtracer[counter] = players[i].mo->tracer;
@ -5835,7 +5835,7 @@ void A_MixUp(mobj_t *actor)
FRACUNIT, anglepos[teleportfrom][1], flags2[teleportfrom]);
//...carry after. same reasoning.
players[i].ktemp_carry = transcarry[teleportfrom];
players[i].carry = transcarry[teleportfrom];
teleported[i] = true;
counter++;
@ -6387,7 +6387,7 @@ void A_Boss2PogoTarget(mobj_t *actor)
if (LUA_CallAction(A_BOSS2POGOTARGET, actor))
return;
if (!actor->target || !(actor->target->flags & MF_SHOOTABLE) || (actor->target->player && actor->target->player->ktemp_flashing)
if (!actor->target || !(actor->target->flags & MF_SHOOTABLE) || (actor->target->player && actor->target->player->flashing)
|| P_AproxDistance(actor->x-actor->target->x, actor->y-actor->target->y) >= FixedMul(512*FRACUNIT, actor->scale))
{
// look for a new target
@ -6400,7 +6400,7 @@ void A_Boss2PogoTarget(mobj_t *actor)
}
// Target hit, retreat!
if ((actor->target->player && actor->target->player->ktemp_flashing > TICRATE) || actor->flags2 & MF2_FRET)
if ((actor->target->player && actor->target->player->flashing > TICRATE) || actor->flags2 & MF2_FRET)
{
UINT8 prandom = P_RandomByte();
actor->z++; // unstick from the floor
@ -7734,7 +7734,7 @@ void A_Dye(mobj_t *actor)
// What if it's a player?
if (target->player)
target->player->ktemp_dye = color;
target->player->dye = color;
if (!color)
{
@ -11621,7 +11621,7 @@ void A_Boss5FindWaypoint(mobj_t *actor)
continue;
if (players[i].mo->health <= 0)
continue;
if (players[i].ktemp_flashing)
if (players[i].flashing)
continue;
if (actor->tracer == players[i].mo) // this was your tracer last time
continue;
@ -11680,7 +11680,7 @@ void A_Boss5FindWaypoint(mobj_t *actor)
continue;
if (players[i].mo->health <= 0)
continue;
if (players[i].ktemp_flashing)
if (players[i].flashing)
continue;
if (actor->tracer == players[i].mo) // this was your tracer last time
continue;
@ -13305,7 +13305,7 @@ void A_ItemPop(mobj_t *actor)
S_StartSound(remains, actor->info->deathsound);
if (!((gametyperules & GTR_BUMPERS) && actor->target->player->bumpers <= 0))
actor->target->player->ktemp_itemroulette = 1;
actor->target->player->itemroulette = 1;
remains->flags2 &= ~MF2_AMBUSH;
@ -13628,9 +13628,9 @@ void A_SPBChase(mobj_t *actor)
if (players[i].respawn.state != RESPAWNST_NONE)
continue;*/ // respawning
if (players[i].ktemp_position < bestrank)
if (players[i].position < bestrank)
{
bestrank = players[i].ktemp_position;
bestrank = players[i].position;
player = &players[i];
}
}
@ -13681,12 +13681,12 @@ void A_SPBChase(mobj_t *actor)
cy = actor->tracer->player->cmomy;
// Switch targets if you're no longer 1st for long enough
if (actor->tracer->player->ktemp_position <= bestrank)
if (actor->tracer->player->position <= bestrank)
actor->extravalue2 = 7*TICRATE;
else if (actor->extravalue2-- <= 0)
actor->extravalue1 = 0; // back to SEEKING
spbplace = actor->tracer->player->ktemp_position;
spbplace = actor->tracer->player->position;
}
dist = P_AproxDistance(P_AproxDistance(actor->x-actor->tracer->x, actor->y-actor->tracer->y), actor->z-actor->tracer->z);
@ -13698,7 +13698,7 @@ void A_SPBChase(mobj_t *actor)
wspeed = (3*defspeed)/2;
if (wspeed < 20*actor->tracer->scale)
wspeed = 20*actor->tracer->scale;
if (actor->tracer->player->ktemp_carry == CR_SLIDING)
if (actor->tracer->player->carry == CR_SLIDING)
wspeed = actor->tracer->player->speed/2;
// ^^^^ current section: These are annoying, and grand metropolis in particular needs this.
@ -13776,7 +13776,7 @@ void A_SPBChase(mobj_t *actor)
&& !players[actor->lastlook].spectator
&& !players[actor->lastlook].exiting)
{
spbplace = players[actor->lastlook].ktemp_position;
spbplace = players[actor->lastlook].position;
players[actor->lastlook].pflags |= PF_RINGLOCK;
if (actor->extravalue2-- <= 0 && players[actor->lastlook].mo)
{
@ -14006,7 +14006,7 @@ static inline boolean PIT_SSMineSearch(mobj_t *thing)
if (thing == grenade->target && grenade->threshold != 0) // Don't blow up at your owner.
return true;
if (thing->player && (thing->player->ktemp_hyudorotimer
if (thing->player && (thing->player->hyudorotimer
|| ((gametyperules & GTR_BUMPERS) && thing->player && thing->player->bumpers <= 0 && thing->player->karmadelay)))
return true;
@ -14248,10 +14248,10 @@ void A_RandomShadowFrame(mobj_t *actor)
// I have NO CLUE how to hardcode all of that fancy Linedef Executor shit so the fire spinout will be done by these entities directly.
if (P_LookForPlayers(actor, false, false, 380<<FRACBITS)) // got target
{
if (actor->target && !actor->target->player->ktemp_flashing
&& !actor->target->player->ktemp_invincibilitytimer
&& !actor->target->player->ktemp_growshrinktimer
&& !actor->target->player->ktemp_spinouttimer
if (actor->target && !actor->target->player->flashing
&& !actor->target->player->invincibilitytimer
&& !actor->target->player->growshrinktimer
&& !actor->target->player->spinouttimer
&& P_IsObjectOnGround(actor->target)
&& actor->z == actor->target->z)
{
@ -14293,10 +14293,10 @@ void A_RoamingShadowThinker(mobj_t *actor)
if (P_LookForPlayers(actor, false, false, 256<<FRACBITS)) // got target
{
if (actor->target && !actor->target->player->ktemp_flashing
&& !actor->target->player->ktemp_invincibilitytimer
&& !actor->target->player->ktemp_growshrinktimer
&& !actor->target->player->ktemp_spinouttimer)
if (actor->target && !actor->target->player->flashing
&& !actor->target->player->invincibilitytimer
&& !actor->target->player->growshrinktimer
&& !actor->target->player->spinouttimer)
{
// send them flying and spawn the WIND!
P_InstaThrust(actor->target, 0, 0);
@ -14534,10 +14534,10 @@ void A_ReaperThinker(mobj_t *actor)
{
if (P_LookForPlayers(actor, false, false, 1024<<FRACBITS)) // got target
{
if (!(actor->target == targetplayermo && actor->target && !actor->target->player->ktemp_flashing
&& !actor->target->player->ktemp_invincibilitytimer
&& !actor->target->player->ktemp_growshrinktimer
&& !actor->target->player->ktemp_spinouttimer))
if (!(actor->target == targetplayermo && actor->target && !actor->target->player->flashing
&& !actor->target->player->invincibilitytimer
&& !actor->target->player->growshrinktimer
&& !actor->target->player->spinouttimer))
P_SetTarget(&actor->target, actor->hnext);
// if the above isn't correct, then we should go back to targetting waypoints or something.
}

View file

@ -1555,7 +1555,7 @@ void T_RaiseSector(raise_t *raise)
continue;
// Option to require spindashing.
if ((raise->flags & RF_SPINDASH) && !thing->player->ktemp_spindash)
if ((raise->flags & RF_SPINDASH) && !thing->player->spindash)
continue;
if (!(thing->z == P_GetSpecialTopZ(thing, raise->sector, sector)))

View file

@ -122,29 +122,29 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon)
if (weapon == 2)
{
// Invulnerable
if (player->ktemp_flashing > 0)
if (player->flashing > 0)
return false;
// Already have fake
if (player->ktemp_roulettetype == 2
|| player->ktemp_eggmanexplode)
if (player->roulettetype == 2
|| player->eggmanexplode)
return false;
}
else
{
// Item-specific timer going off
if (player->ktemp_stealingtimer
|| player->ktemp_rocketsneakertimer
|| player->ktemp_eggmanexplode)
if (player->stealingtimer
|| player->rocketsneakertimer
|| player->eggmanexplode)
return false;
// Item slot already taken up
if (player->ktemp_itemroulette
|| (weapon != 3 && player->ktemp_itemamount)
if (player->itemroulette
|| (weapon != 3 && player->itemamount)
|| (player->pflags & PF_ITEMOUT))
return false;
if (weapon == 3 && K_GetShieldFromItem(player->ktemp_itemtype) != KSHIELD_NONE)
if (weapon == 3 && K_GetShieldFromItem(player->itemtype) != KSHIELD_NONE)
return false; // No stacking shields!
}
}
@ -243,17 +243,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_InstaThrust(player->mo, player->mo->angle, 20<<FRACBITS);
return;
case MT_FLOATINGITEM: // SRB2Kart
if (!P_CanPickupItem(player, 3) || (player->ktemp_itemamount && player->ktemp_itemtype != special->threshold))
if (!P_CanPickupItem(player, 3) || (player->itemamount && player->itemtype != special->threshold))
return;
if ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0)
return;
player->ktemp_itemtype = special->threshold;
if ((UINT16)(player->ktemp_itemamount) + special->movecount > 255)
player->ktemp_itemamount = 255;
player->itemtype = special->threshold;
if ((UINT16)(player->itemamount) + special->movecount > 255)
player->itemamount = 255;
else
player->ktemp_itemamount += special->movecount;
player->itemamount += special->movecount;
S_StartSound(special, special->info->deathsound);
@ -332,7 +332,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
{
mobj_t *spbexplode;
if (player->ktemp_bubbleblowup > 0)
if (player->bubbleblowup > 0)
{
K_DropHnextList(player, false);
special->extravalue1 = 2; // WAIT...
@ -364,7 +364,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (toucher->hitlag > 0)
return;
player->ktemp_emeralds |= special->extravalue1;
player->emeralds |= special->extravalue1;
K_CheckEmeralds(player);
break;
/*
@ -384,16 +384,16 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
return;
// kill
if (player->ktemp_invincibilitytimer > 0
|| player->ktemp_growshrinktimer > 0
|| player->ktemp_flamedash > 0)
if (player->invincibilitytimer > 0
|| player->growshrinktimer > 0
|| player->flamedash > 0)
{
P_KillMobj(special, toucher, toucher, DMG_NORMAL);
return;
}
// no interaction
if (player->ktemp_flashing > 0 || player->ktemp_hyudorotimer > 0 || P_PlayerInPain(player))
if (player->flashing > 0 || player->hyudorotimer > 0 || P_PlayerInPain(player))
return;
// attach to player!
@ -404,8 +404,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (special->fuse || !P_CanPickupItem(player, 1) || ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0))
return;
player->ktemp_itemroulette = 1;
player->ktemp_roulettetype = 1;
player->itemroulette = 1;
player->roulettetype = 1;
// Karma fireworks
for (i = 0; i < 5; i++)
@ -476,7 +476,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
special->extravalue1 = 1; // Ring collect animation timer
special->angle = R_PointToAngle2(toucher->x, toucher->y, special->x, special->y); // animation angle
P_SetTarget(&special->target, toucher); // toucher for thinker
player->ktemp_pickuprings++;
player->pickuprings++;
return;
@ -953,31 +953,31 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
if (target->target->player->pflags & PF_ITEMOUT)
{
if ((target->type == MT_BANANA_SHIELD && target->target->player->ktemp_itemtype == KITEM_BANANA) // trail items
|| (target->type == MT_SSMINE_SHIELD && target->target->player->ktemp_itemtype == KITEM_MINE)
|| (target->type == MT_SINK_SHIELD && target->target->player->ktemp_itemtype == KITEM_KITCHENSINK))
if ((target->type == MT_BANANA_SHIELD && target->target->player->itemtype == KITEM_BANANA) // trail items
|| (target->type == MT_SSMINE_SHIELD && target->target->player->itemtype == KITEM_MINE)
|| (target->type == MT_SINK_SHIELD && target->target->player->itemtype == KITEM_KITCHENSINK))
{
if (target->movedir != 0 && target->movedir < (UINT16)target->target->player->ktemp_itemamount)
if (target->movedir != 0 && target->movedir < (UINT16)target->target->player->itemamount)
{
if (target->target->hnext)
K_KillBananaChain(target->target->hnext, inflictor, source);
target->target->player->ktemp_itemamount = 0;
target->target->player->itemamount = 0;
}
else if (target->target->player->ktemp_itemamount)
target->target->player->ktemp_itemamount--;
else if (target->target->player->itemamount)
target->target->player->itemamount--;
}
else if ((target->type == MT_ORBINAUT_SHIELD && target->target->player->ktemp_itemtype == KITEM_ORBINAUT) // orbit items
|| (target->type == MT_JAWZ_SHIELD && target->target->player->ktemp_itemtype == KITEM_JAWZ))
else if ((target->type == MT_ORBINAUT_SHIELD && target->target->player->itemtype == KITEM_ORBINAUT) // orbit items
|| (target->type == MT_JAWZ_SHIELD && target->target->player->itemtype == KITEM_JAWZ))
{
if (target->target->player->ktemp_itemamount)
target->target->player->ktemp_itemamount--;
if (target->target->player->itemamount)
target->target->player->itemamount--;
if (target->lastlook != 0)
{
K_RepairOrbitChain(target);
}
}
if (!target->target->player->ktemp_itemamount)
if (!target->target->player->itemamount)
target->target->player->pflags &= ~PF_ITEMOUT;
if (target->target->hnext == target)
@ -1607,10 +1607,10 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
break;
}
K_DropEmeraldsFromPlayer(player, player->ktemp_emeralds);
K_DropEmeraldsFromPlayer(player, player->emeralds);
K_SetHitLagForObjects(player->mo, inflictor, 15);
player->ktemp_carry = CR_NONE;
player->carry = CR_NONE;
player->mo->color = player->skincolor;
player->mo->colorized = false;
@ -1782,7 +1782,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
}
}
if (player->ktemp_invincibilitytimer > 0 || player->ktemp_growshrinktimer > 0 || player->ktemp_hyudorotimer > 0)
if (player->invincibilitytimer > 0 || player->growshrinktimer > 0 || player->hyudorotimer > 0)
{
// Full invulnerability
K_DoInstashield(player);
@ -1791,7 +1791,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (combo == false)
{
if (player->ktemp_flashing > 0)
if (player->flashing > 0)
{
// Post-hit invincibility
K_DoInstashield(player);
@ -1826,11 +1826,11 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (source && source != player->mo && source->player)
{
// Extend the invincibility if the hit was a direct hit.
if (inflictor == source && source->player->ktemp_invincibilitytimer)
if (inflictor == source && source->player->invincibilitytimer)
{
kinvextend = (source->player->ktemp_invincibilitytimer)+5*TICRATE;
//CONS_Printf("extend k_invincibilitytimer for %s - old value %d new value %d\n", player_names[source->player - players], source->player->ktemp_invincibilitytimer/TICRATE, kinvextend/TICRATE);
source->player->ktemp_invincibilitytimer = kinvextend;
kinvextend = (source->player->invincibilitytimer)+5*TICRATE;
//CONS_Printf("extend k_invincibilitytimer for %s - old value %d new value %d\n", player_names[source->player - players], source->player->invincibilitytimer/TICRATE, kinvextend/TICRATE);
source->player->invincibilitytimer = kinvextend;
}
K_PlayHitEmSound(source);
@ -1847,8 +1847,8 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (damagetype & DMG_STEAL)
{
// Give them ALL of your emeralds instantly :)
source->player->ktemp_emeralds |= player->ktemp_emeralds;
player->ktemp_emeralds = 0;
source->player->emeralds |= player->emeralds;
player->emeralds = 0;
K_CheckEmeralds(source->player);
}
}
@ -1860,13 +1860,13 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (!(damagetype & DMG_STEAL))
{
// Drop all of your emeralds
K_DropEmeraldsFromPlayer(player, player->ktemp_emeralds);
K_DropEmeraldsFromPlayer(player, player->emeralds);
}
}
player->ktemp_sneakertimer = player->ktemp_numsneakers = 0;
player->ktemp_driftboost = 0;
player->ktemp_ringboost = 0;
player->sneakertimer = player->numsneakers = 0;
player->driftboost = 0;
player->ringboost = 0;
switch (type)
{
@ -1897,7 +1897,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (type != DMG_STING)
{
player->ktemp_flashing = K_GetKartFlashing(player);
player->flashing = K_GetKartFlashing(player);
}
P_PlayRinglossSound(player->mo);
@ -1918,7 +1918,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
K_DropHnextList(player, false);
}
player->ktemp_instashield = 15;
player->instashield = 15;
K_SetHitLagForObjects(target, inflictor, laglength);
return true;
}
@ -2036,7 +2036,7 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
return;
// Have a shield? You get hit, but don't lose your rings!
if (K_GetShieldFromItem(player->ktemp_itemtype) != KSHIELD_NONE)
if (K_GetShieldFromItem(player->itemtype) != KSHIELD_NONE)
return;
// 20 is the maximum number of rings that can be taken from you at once - half the span of your counter

View file

@ -350,7 +350,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
// Less friction when hitting horizontal springs
if (!vertispeed)
{
if (!object->player->ktemp_tiregrease)
if (!object->player->tiregrease)
{
UINT8 i;
for (i = 0; i < 2; i++)
@ -363,7 +363,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
}
}
object->player->ktemp_tiregrease = greasetics; //FixedMul(greasetics << FRACBITS, finalSpeed/72) >> FRACBITS
object->player->tiregrease = greasetics; //FixedMul(greasetics << FRACBITS, finalSpeed/72) >> FRACBITS
}
}
@ -387,8 +387,8 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
P_ResetPlayer(object->player);
object->player->ktemp_springstars = max(vertispeed, horizspeed) / FRACUNIT / 2;
object->player->ktemp_springcolor = starcolor;
object->player->springstars = max(vertispeed, horizspeed) / FRACUNIT / 2;
object->player->springcolor = starcolor;
}
return true;
@ -697,8 +697,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
// Bubble Shield reflect
if (((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->ktemp_bubbleblowup)
|| (thing->player && thing->player->ktemp_bubbleblowup))
if (((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->bubbleblowup)
|| (thing->player && thing->player->bubbleblowup))
&& (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD
|| tmthing->type == MT_BANANA || tmthing->type == MT_EGGMANITEM || tmthing->type == MT_BALLHOG
|| tmthing->type == MT_SSMINE || tmthing->type == MT_LANDMINE || tmthing->type == MT_SINK
@ -722,8 +722,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetTarget(&tmthing, oldtmthing);*/
if (P_PlayerInPain(tmthing->player)
|| tmthing->player->ktemp_flashing || tmthing->player->ktemp_hyudorotimer
|| tmthing->player->ktemp_justbumped || tmthing->scale > thing->scale + (mapobjectscale/8))
|| tmthing->player->flashing || tmthing->player->hyudorotimer
|| tmthing->player->justbumped || tmthing->scale > thing->scale + (mapobjectscale/8))
return true;
// Player Damage
@ -755,8 +755,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
// no interaction
return true;
}
else if (((tmthing->type == MT_BUBBLESHIELD && tmthing->target->player && tmthing->target->player->ktemp_bubbleblowup)
|| (tmthing->player && tmthing->player->ktemp_bubbleblowup))
else if (((tmthing->type == MT_BUBBLESHIELD && tmthing->target->player && tmthing->target->player->bubbleblowup)
|| (tmthing->player && tmthing->player->bubbleblowup))
&& (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|| thing->type == MT_BANANA || thing->type == MT_EGGMANITEM || thing->type == MT_BALLHOG
|| thing->type == MT_SSMINE || tmthing->type == MT_LANDMINE || thing->type == MT_SINK
@ -780,8 +780,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetTarget(&tmthing, oldtmthing);*/
if (P_PlayerInPain(thing->player)
|| thing->player->ktemp_flashing || thing->player->ktemp_hyudorotimer
|| thing->player->ktemp_justbumped || thing->scale > tmthing->scale + (mapobjectscale/8))
|| thing->player->flashing || thing->player->hyudorotimer
|| thing->player->justbumped || thing->scale > tmthing->scale + (mapobjectscale/8))
return true;
// Player Damage
@ -1235,7 +1235,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
if (thing->player->ktemp_hyudorotimer || tmthing->player->ktemp_hyudorotimer)
if (thing->player->hyudorotimer || tmthing->player->hyudorotimer)
{
return true;
}
@ -1289,8 +1289,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (!thing->health)
return true; // dead
if (tmthing->player->ktemp_invincibilitytimer > 0
|| tmthing->player->ktemp_growshrinktimer > 0)
if (tmthing->player->invincibilitytimer > 0
|| tmthing->player->growshrinktimer > 0)
{
if (thing->type == MT_BLUEROBRA_JOINT)
P_KillMobj(thing->target, tmthing, tmthing, DMG_NORMAL);
@ -1315,8 +1315,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (!thing->health)
return true; // dead
if (tmthing->player->ktemp_invincibilitytimer > 0
|| tmthing->player->ktemp_growshrinktimer > 0)
if (tmthing->player->invincibilitytimer > 0
|| tmthing->player->growshrinktimer > 0)
{
P_KillMobj(thing, tmthing, tmthing, DMG_NORMAL);
return true; // kill
@ -1346,15 +1346,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true; // underneath
// kill
if (tmthing->player->ktemp_invincibilitytimer > 0
|| tmthing->player->ktemp_growshrinktimer > 0)
if (tmthing->player->invincibilitytimer > 0
|| tmthing->player->growshrinktimer > 0)
{
P_KillMobj(thing, tmthing, tmthing, DMG_NORMAL);
return true;
}
// no interaction
if (tmthing->player->ktemp_flashing > 0 || tmthing->player->ktemp_hyudorotimer > 0 || tmthing->player->ktemp_spinouttimer > 0)
if (tmthing->player->flashing > 0 || tmthing->player->hyudorotimer > 0 || tmthing->player->spinouttimer > 0)
return true;
// collide
@ -2464,7 +2464,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
const fixed_t maxstepmove = FixedMul(MAXSTEPMOVE, mapobjectscale);
fixed_t maxstep = maxstepmove;
if (thing->player && thing->player->ktemp_waterskip)
if (thing->player && thing->player->waterskip)
maxstep += maxstepmove; // Add some extra stepmove when waterskipping
// If using type Section1:13, double the maxstep.

View file

@ -191,7 +191,7 @@ static void P_CyclePlayerMobjState(mobj_t *mobj)
// P_SetPlayerMobjState
// Returns true if the mobj is still present.
//
// Separate from P_SetMobjState because of the ktemp_flashing check and Super states
// Separate from P_SetMobjState because of the flashing check and Super states
//
boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
{
@ -1104,7 +1104,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
P_PlayerFlip(mo);
}
if (mo->player->ktemp_waterskip)
if (mo->player->waterskip)
{
gravityadd = (4*gravityadd)/3;
}
@ -1803,13 +1803,13 @@ void P_XYMovement(mobj_t *mo)
if (mo->type == MT_FLINGRING || mo->type == MT_BALLHOG || mo->type == MT_BUBBLESHIELDTRAP)
return;
if (player && (player->ktemp_spinouttimer && !player->ktemp_wipeoutslow)
&& player->speed <= FixedDiv(20*mapobjectscale, player->ktemp_offroad + FRACUNIT))
if (player && (player->spinouttimer && !player->wipeoutslow)
&& player->speed <= FixedDiv(20*mapobjectscale, player->offroad + FRACUNIT))
return;
//}
if (((!(mo->eflags & MFE_VERTICALFLIP) && mo->z > mo->floorz) || (mo->eflags & MFE_VERTICALFLIP && mo->z+mo->height < mo->ceilingz))
&& !(player && player->ktemp_carry == CR_SLIDING))
&& !(player && player->carry == CR_SLIDING))
return; // no friction when airborne
P_XYFriction(mo, oldx, oldy);
@ -2717,7 +2717,7 @@ void P_PlayerZMovement(mobj_t *mo)
mo->z = mo->floorz;
// Get up if you fell.
if (mo->player->panim == PA_HURT && mo->player->ktemp_spinouttimer == 0 && mo->player->tumbleBounces == 0)
if (mo->player->panim == PA_HURT && mo->player->spinouttimer == 0 && mo->player->tumbleBounces == 0)
P_SetPlayerMobjState(mo, S_KART_STILL);
if (!mo->standingslope && (mo->eflags & MFE_VERTICALFLIP ? tmceilingslope : tmfloorslope)) {
@ -3058,9 +3058,9 @@ void P_MobjCheckWater(mobj_t *mobj)
}
// skipping stone!
if (p && p->ktemp_waterskip < 2
if (p && p->waterskip < 2
&& ((p->speed/3 > abs(mobj->momz)) // Going more forward than horizontal, so you can skip across the water.
|| (p->speed > 20*mapobjectscale && p->ktemp_waterskip)) // Already skipped once, so you can skip once more!
|| (p->speed > 20*mapobjectscale && p->waterskip)) // Already skipped once, so you can skip once more!
&& ((!(mobj->eflags & MFE_VERTICALFLIP) && thingtop - mobj->momz > mobj->watertop)
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z - mobj->momz < mobj->waterbottom)))
{
@ -3074,7 +3074,7 @@ void P_MobjCheckWater(mobj_t *mobj)
else
mobj->momz = FixedMul(hop, mobj->scale);
p->ktemp_waterskip++;
p->waterskip++;
}
}
@ -3525,7 +3525,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
mobj->eflags &= ~MFE_JUSTSTEPPEDDOWN;
// Zoom tube
if ((mobj->player->ktemp_carry == CR_ZOOMTUBE && mobj->tracer && !P_MobjWasRemoved(mobj->tracer))
if ((mobj->player->carry == CR_ZOOMTUBE && mobj->tracer && !P_MobjWasRemoved(mobj->tracer))
|| mobj->player->respawn.state == RESPAWNST_MOVE)
{
P_HitSpecialLines(mobj, mobj->x, mobj->y, mobj->momx, mobj->momy);
@ -5384,7 +5384,7 @@ static void P_MobjSceneryThink(mobj_t *mobj)
}
// Do this in an easy way
if (mobj->target->player->ktemp_itemroulette)
if (mobj->target->player->itemroulette)
{
mobj->tracer->color = mobj->target->player->skincolor;
mobj->tracer->colorized = true;
@ -5397,17 +5397,17 @@ static void P_MobjSceneryThink(mobj_t *mobj)
if (!(mobj->renderflags & RF_DONTDRAW))
{
const INT32 numberdisplaymin = ((mobj->target->player->ktemp_itemtype == KITEM_ORBINAUT) ? 5 : 2);
const INT32 numberdisplaymin = ((mobj->target->player->itemtype == KITEM_ORBINAUT) ? 5 : 2);
// Set it to use the correct states for its condition
if (mobj->target->player->ktemp_itemroulette)
if (mobj->target->player->itemroulette)
{
P_SetMobjState(mobj, S_PLAYERARROW_BOX);
mobj->tracer->sprite = SPR_ITEM;
mobj->tracer->frame = FF_FULLBRIGHT|(((mobj->target->player->ktemp_itemroulette % (13*3)) / 3) + 1);
mobj->tracer->frame = FF_FULLBRIGHT|(((mobj->target->player->itemroulette % (13*3)) / 3) + 1);
mobj->tracer->renderflags &= ~RF_DONTDRAW;
}
else if (mobj->target->player->ktemp_stealingtimer < 0)
else if (mobj->target->player->stealingtimer < 0)
{
P_SetMobjState(mobj, S_PLAYERARROW_BOX);
mobj->tracer->sprite = SPR_ITEM;
@ -5417,14 +5417,14 @@ static void P_MobjSceneryThink(mobj_t *mobj)
else
mobj->tracer->renderflags |= RF_DONTDRAW;
}
else if ((mobj->target->player->ktemp_stealingtimer > 0) && (leveltime & 2))
else if ((mobj->target->player->stealingtimer > 0) && (leveltime & 2))
{
P_SetMobjState(mobj, S_PLAYERARROW_BOX);
mobj->tracer->sprite = SPR_ITEM;
mobj->tracer->frame = FF_FULLBRIGHT|KITEM_HYUDORO;
mobj->tracer->renderflags &= ~RF_DONTDRAW;
}
else if (mobj->target->player->ktemp_eggmanexplode > 1)
else if (mobj->target->player->eggmanexplode > 1)
{
P_SetMobjState(mobj, S_PLAYERARROW_BOX);
mobj->tracer->sprite = SPR_ITEM;
@ -5434,9 +5434,9 @@ static void P_MobjSceneryThink(mobj_t *mobj)
else
mobj->tracer->renderflags |= RF_DONTDRAW;
}
else if (mobj->target->player->ktemp_rocketsneakertimer > 1)
else if (mobj->target->player->rocketsneakertimer > 1)
{
//itembar = mobj->target->player->ktemp_rocketsneakertimer; -- not today satan
//itembar = mobj->target->player->rocketsneakertimer; -- not today satan
P_SetMobjState(mobj, S_PLAYERARROW_BOX);
mobj->tracer->sprite = SPR_ITEM;
mobj->tracer->frame = FF_FULLBRIGHT|KITEM_ROCKETSNEAKER;
@ -5445,15 +5445,15 @@ static void P_MobjSceneryThink(mobj_t *mobj)
else
mobj->tracer->renderflags |= RF_DONTDRAW;
}
else if (mobj->target->player->ktemp_itemtype && mobj->target->player->ktemp_itemamount > 0)
else if (mobj->target->player->itemtype && mobj->target->player->itemamount > 0)
{
P_SetMobjState(mobj, S_PLAYERARROW_BOX);
switch (mobj->target->player->ktemp_itemtype)
switch (mobj->target->player->itemtype)
{
case KITEM_ORBINAUT:
mobj->tracer->sprite = SPR_ITMO;
mobj->tracer->frame = FF_FULLBRIGHT|(min(mobj->target->player->ktemp_itemamount-1, 3));
mobj->tracer->frame = FF_FULLBRIGHT|(min(mobj->target->player->itemamount-1, 3));
break;
case KITEM_INVINCIBILITY:
mobj->tracer->sprite = SPR_ITMI;
@ -5465,7 +5465,7 @@ static void P_MobjSceneryThink(mobj_t *mobj)
break;
default:
mobj->tracer->sprite = SPR_ITEM;
mobj->tracer->frame = FF_FULLBRIGHT|(mobj->target->player->ktemp_itemtype);
mobj->tracer->frame = FF_FULLBRIGHT|(mobj->target->player->itemtype);
break;
}
@ -5487,8 +5487,8 @@ static void P_MobjSceneryThink(mobj_t *mobj)
mobj->tracer->destscale = scale;
if (mobj->target->player->ktemp_itemamount >= numberdisplaymin
&& mobj->target->player->ktemp_itemamount <= 10) // Meh, too difficult to support greater than this; convert this to a decent HUD object and then maybe :V
if (mobj->target->player->itemamount >= numberdisplaymin
&& mobj->target->player->itemamount <= 10) // Meh, too difficult to support greater than this; convert this to a decent HUD object and then maybe :V
{
mobj_t *number = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_OVERLAY);
mobj_t *numx = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_OVERLAY);
@ -5497,7 +5497,7 @@ static void P_MobjSceneryThink(mobj_t *mobj)
P_SetMobjState(number, S_PLAYERARROW_NUMBER);
P_SetScale(number, mobj->scale);
number->destscale = scale;
number->frame = FF_FULLBRIGHT|(mobj->target->player->ktemp_itemamount);
number->frame = FF_FULLBRIGHT|(mobj->target->player->itemamount);
P_SetTarget(&numx->target, mobj);
P_SetMobjState(numx, S_PLAYERARROW_X);
@ -6505,12 +6505,12 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
if (p)
{
if (p->ktemp_driftboost > mobj->movecount)
if (p->driftboost > mobj->movecount)
{
; // reset animation
}
mobj->movecount = p->ktemp_driftboost;
mobj->movecount = p->driftboost;
}
}
break;
@ -6538,9 +6538,9 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
if (p)
{
if (p->ktemp_sneakertimer > mobj->movecount)
if (p->sneakertimer > mobj->movecount)
P_SetMobjState(mobj, S_BOOSTFLAME);
mobj->movecount = p->ktemp_sneakertimer;
mobj->movecount = p->sneakertimer;
}
}
@ -6569,7 +6569,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
mobj->colorized = mobj->target->colorized;
break;
case MT_INVULNFLASH:
if (!mobj->target || !mobj->target->health || (mobj->target->player && !mobj->target->player->ktemp_invincibilitytimer))
if (!mobj->target || !mobj->target->health || (mobj->target->player && !mobj->target->player->invincibilitytimer))
{
P_RemoveMobj(mobj);
return false;
@ -6578,7 +6578,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
break;
case MT_BRAKEDRIFT:
if ((!mobj->target || !mobj->target->health || !mobj->target->player || !P_IsObjectOnGround(mobj->target))
|| !mobj->target->player->ktemp_drift || !(mobj->target->player->pflags & PF_BRAKEDRIFT)
|| !mobj->target->player->drift || !(mobj->target->player->pflags & PF_BRAKEDRIFT)
|| !((mobj->target->player->cmd.buttons & BT_BRAKE)
|| (K_GetKartButtons(mobj->target->player) & BT_ACCELERATE))) // Letting go of accel functions about the same as brake-drifting
{
@ -6587,17 +6587,17 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
}
else
{
UINT8 driftcolor = K_DriftSparkColor(mobj->target->player, mobj->target->player->ktemp_driftcharge);
UINT8 driftcolor = K_DriftSparkColor(mobj->target->player, mobj->target->player->driftcharge);
fixed_t newx, newy;
angle_t travelangle;
travelangle = mobj->target->angle - ((ANGLE_45/5)*mobj->target->player->ktemp_drift);
travelangle = mobj->target->angle - ((ANGLE_45/5)*mobj->target->player->drift);
newx = mobj->target->x + P_ReturnThrustX(mobj->target, travelangle+ANGLE_180, 24*mobj->target->scale);
newy = mobj->target->y + P_ReturnThrustY(mobj->target, travelangle+ANGLE_180, 24*mobj->target->scale);
P_TeleportMove(mobj, newx, newy, mobj->target->z);
mobj->angle = travelangle - ((ANGLE_90/5)*mobj->target->player->ktemp_drift);
mobj->angle = travelangle - ((ANGLE_90/5)*mobj->target->player->drift);
P_SetScale(mobj, (mobj->destscale = mobj->target->scale));
if (driftcolor != SKINCOLOR_NONE)
@ -6626,7 +6626,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
K_MatchGenericExtraFlags(mobj, mobj->target);
/* FALLTHRU */
case MT_INSTASHIELDA:
if (!mobj->target || !mobj->target->health || (mobj->target->player && !mobj->target->player->ktemp_instashield))
if (!mobj->target || !mobj->target->health || (mobj->target->player && !mobj->target->player->instashield))
{
P_RemoveMobj(mobj);
return false;
@ -6697,7 +6697,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
break;
case MT_TIREGREASE:
if (!mobj->target || P_MobjWasRemoved(mobj->target) || !mobj->target->player
|| !mobj->target->player->ktemp_tiregrease)
|| !mobj->target->player->tiregrease)
{
P_RemoveMobj(mobj);
return false;
@ -6709,7 +6709,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
const angle_t off = FixedAngle(40*FRACUNIT);
angle_t ang = K_MomentumAngle(mobj->target);
fixed_t z;
UINT8 trans = (mobj->target->player->ktemp_tiregrease * (NUMTRANSMAPS+1)) / greasetics;
UINT8 trans = (mobj->target->player->tiregrease * (NUMTRANSMAPS+1)) / greasetics;
if (trans > NUMTRANSMAPS)
trans = NUMTRANSMAPS;
@ -6746,7 +6746,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
{
fixed_t destx, desty;
if (!mobj->target || !mobj->target->health || !mobj->target->player
|| mobj->target->player->ktemp_curshield != KSHIELD_THUNDER)
|| mobj->target->player->curshield != KSHIELD_THUNDER)
{
P_RemoveMobj(mobj);
return false;
@ -6787,7 +6787,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
statenum_t curstate;
if (!mobj->target || !mobj->target->health || !mobj->target->player
|| mobj->target->player->ktemp_curshield != KSHIELD_BUBBLE)
|| mobj->target->player->curshield != KSHIELD_BUBBLE)
{
P_RemoveMobj(mobj);
return false;
@ -6796,9 +6796,9 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
scale = (5*mobj->target->scale)>>2;
curstate = ((mobj->tics == 1) ? (mobj->state->nextstate) : ((statenum_t)(mobj->state-states)));
if (mobj->target->player->ktemp_bubbleblowup)
if (mobj->target->player->bubbleblowup)
{
INT32 blow = mobj->target->player->ktemp_bubbleblowup;
INT32 blow = mobj->target->player->bubbleblowup;
if (blow > bubbletime)
blow = bubbletime;
@ -6810,7 +6810,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
scale += (blow * (3*scale)) / bubbletime;
mobj->frame = (states[S_BUBBLESHIELDBLOWUP].frame + mobj->extravalue1);
if ((mobj->target->player->ktemp_bubbleblowup > bubbletime) && (leveltime & 1))
if ((mobj->target->player->bubbleblowup > bubbletime) && (leveltime & 1))
mobj->frame = (states[S_BUBBLESHIELDBLOWUP].frame + 5);
if (mobj->extravalue1 < 4 && mobj->extravalue2 < blow && !mobj->cvmem && (leveltime & 1)) // Growing
@ -6875,14 +6875,14 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
}
else
{
if (mobj->target->player->ktemp_bubblecool && ((curstate-S_BUBBLESHIELD1) & 1))
if (mobj->target->player->bubblecool && ((curstate-S_BUBBLESHIELD1) & 1))
mobj->renderflags |= RF_GHOSTLY;
else
mobj->renderflags &= ~RF_GHOSTLYMASK;
}
}
mobj->extravalue2 = mobj->target->player->ktemp_bubbleblowup;
mobj->extravalue2 = mobj->target->player->bubbleblowup;
P_SetScale(mobj, (mobj->destscale = scale));
if (!splitscreen /*&& rendermode != render_soft*/)
@ -6916,19 +6916,19 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
INT32 flamemax = 0;
if (!mobj->target || !mobj->target->health || !mobj->target->player
|| mobj->target->player->ktemp_curshield != KSHIELD_FLAME)
|| mobj->target->player->curshield != KSHIELD_FLAME)
{
P_RemoveMobj(mobj);
return false;
}
flamemax = mobj->target->player->ktemp_flamelength * flameseg;
flamemax = mobj->target->player->flamelength * flameseg;
P_SetScale(mobj, (mobj->destscale = (5*mobj->target->scale)>>2));
curstate = ((mobj->tics == 1) ? (mobj->state->nextstate) : ((statenum_t)(mobj->state-states)));
if (mobj->target->player->ktemp_flamedash)
if (mobj->target->player->flamedash)
{
if (!(curstate >= S_FLAMESHIELDDASH1 && curstate <= S_FLAMESHIELDDASH12))
P_SetMobjState(mobj, S_FLAMESHIELDDASH1);
@ -6947,7 +6947,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
UINT8 i;
UINT8 nl = 2;
if (mobj->target->player->ktemp_flamedash > mobj->extravalue1)
if (mobj->target->player->flamedash > mobj->extravalue1)
nl = 3;
for (i = 0; i < nl; i++)
@ -6973,9 +6973,9 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
P_SetMobjState(mobj, S_FLAMESHIELD1);
}
mobj->extravalue1 = mobj->target->player->ktemp_flamedash;
mobj->extravalue1 = mobj->target->player->flamedash;
if (mobj->target->player->ktemp_flamemeter > flamemax)
if (mobj->target->player->flamemeter > flamemax)
{
mobj_t *flash = P_SpawnMobj(mobj->x + mobj->target->momx, mobj->y + mobj->target->momy, mobj->z + mobj->target->momz, MT_THOK);
P_SetMobjState(flash, S_FLAMESHIELDFLASH);
@ -7030,7 +7030,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
P_RemoveMobj(mobj);
return false;
}
if (mobj->target->player && !mobj->target->player->ktemp_rocketsneakertimer)
if (mobj->target->player && !mobj->target->player->rocketsneakertimer)
{
mobj->flags &= ~MF_NOGRAVITY;
mobj->angle += ANGLE_45;
@ -7082,7 +7082,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
if (state < S_PLAYERBOMB1 || state > S_PLAYERBOMB20)
P_SetMobjState(mobj, S_PLAYERBOMB1);
if (mobj->target->player->ktemp_flashing && (leveltime & 1))
if (mobj->target->player->flashing && (leveltime & 1))
mobj->renderflags |= RF_DONTDRAW;
else
mobj->renderflags &= ~RF_DONTDRAW;
@ -7652,7 +7652,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
player_t *player = mobj->target->player;
mobj->extravalue1 = 1;
player->ktemp_offroad += 2<<FRACBITS;
player->offroad += 2<<FRACBITS;
P_TeleportMove(mobj,
player->mo->x + P_ReturnThrustX(NULL, player->mo->angle, player->mo->radius)
@ -10195,7 +10195,7 @@ void P_SpawnPlayer(INT32 playernum)
}
if (leveltime > introtime)
p->ktemp_flashing = K_GetKartFlashing(p); // Babysitting deterrent
p->flashing = K_GetKartFlashing(p); // Babysitting deterrent
mobj = P_SpawnMobj(0, 0, 0, MT_PLAYER);
(mobj->player = p)->mo = mobj;

View file

@ -135,7 +135,7 @@ static void P_NetArchivePlayers(void)
WRITEUINT32(save_p, players[i].pflags);
WRITEUINT8(save_p, players[i].panim);
WRITEUINT8(save_p, players[i].spectator);
WRITEUINT32(save_p, players[i].ktemp_spectatewait);
WRITEUINT32(save_p, players[i].spectatewait);
WRITEUINT16(save_p, players[i].flashpal);
WRITEUINT16(save_p, players[i].flashcount);
@ -209,99 +209,99 @@ static void P_NetArchivePlayers(void)
if (flags & FOLLOWER)
WRITEUINT32(save_p, players[i].follower->mobjnum);
WRITEUINT16(save_p, players[i].ktemp_nocontrol);
WRITEUINT8(save_p, players[i].ktemp_carry);
WRITEUINT16(save_p, players[i].ktemp_dye);
WRITEUINT16(save_p, players[i].nocontrol);
WRITEUINT8(save_p, players[i].carry);
WRITEUINT16(save_p, players[i].dye);
WRITEUINT8(save_p, players[i].ktemp_position);
WRITEUINT8(save_p, players[i].ktemp_oldposition);
WRITEUINT8(save_p, players[i].ktemp_positiondelay);
WRITEUINT8(save_p, players[i].position);
WRITEUINT8(save_p, players[i].oldposition);
WRITEUINT8(save_p, players[i].positiondelay);
WRITEUINT32(save_p, players[i].distancetofinish);
WRITEUINT32(save_p, K_GetWaypointHeapIndex(players[i].nextwaypoint));
WRITEUINT32(save_p, players[i].airtime);
WRITEUINT8(save_p, players[i].ktemp_startboost);
WRITEUINT8(save_p, players[i].startboost);
WRITEUINT16(save_p, players[i].ktemp_flashing);
WRITEUINT16(save_p, players[i].ktemp_spinouttimer);
WRITEUINT8(save_p, players[i].ktemp_spinouttype);
WRITEUINT8(save_p, players[i].ktemp_instashield);
WRITEUINT8(save_p, players[i].ktemp_wipeoutslow);
WRITEUINT8(save_p, players[i].ktemp_justbumped);
WRITEUINT16(save_p, players[i].flashing);
WRITEUINT16(save_p, players[i].spinouttimer);
WRITEUINT8(save_p, players[i].spinouttype);
WRITEUINT8(save_p, players[i].instashield);
WRITEUINT8(save_p, players[i].wipeoutslow);
WRITEUINT8(save_p, players[i].justbumped);
WRITEUINT8(save_p, players[i].tumbleBounces);
WRITEUINT16(save_p, players[i].tumbleHeight);
WRITESINT8(save_p, players[i].ktemp_drift);
WRITEFIXED(save_p, players[i].ktemp_driftcharge);
WRITEUINT8(save_p, players[i].ktemp_driftboost);
WRITESINT8(save_p, players[i].drift);
WRITEFIXED(save_p, players[i].driftcharge);
WRITEUINT8(save_p, players[i].driftboost);
WRITESINT8(save_p, players[i].ktemp_aizdriftstrat);
WRITESINT8(save_p, players[i].aizdriftstrat);
WRITEINT32(save_p, players[i].aizdrifttilt);
WRITEINT32(save_p, players[i].aizdriftturn);
WRITEFIXED(save_p, players[i].ktemp_offroad);
WRITEUINT8(save_p, players[i].ktemp_waterskip);
WRITEFIXED(save_p, players[i].offroad);
WRITEUINT8(save_p, players[i].waterskip);
WRITEUINT16(save_p, players[i].ktemp_tiregrease);
WRITEUINT16(save_p, players[i].ktemp_springstars);
WRITEUINT16(save_p, players[i].ktemp_springcolor);
WRITEUINT8(save_p, players[i].ktemp_dashpadcooldown);
WRITEUINT16(save_p, players[i].tiregrease);
WRITEUINT16(save_p, players[i].springstars);
WRITEUINT16(save_p, players[i].springcolor);
WRITEUINT8(save_p, players[i].dashpadcooldown);
WRITEUINT16(save_p, players[i].ktemp_spindash);
WRITEFIXED(save_p, players[i].ktemp_spindashspeed);
WRITEUINT8(save_p, players[i].ktemp_spindashboost);
WRITEUINT16(save_p, players[i].spindash);
WRITEFIXED(save_p, players[i].spindashspeed);
WRITEUINT8(save_p, players[i].spindashboost);
WRITEUINT8(save_p, players[i].ktemp_numboosts);
WRITEFIXED(save_p, players[i].ktemp_boostpower);
WRITEFIXED(save_p, players[i].ktemp_speedboost);
WRITEFIXED(save_p, players[i].ktemp_accelboost);
WRITEFIXED(save_p, players[i].ktemp_handleboost);
WRITEANGLE(save_p, players[i].ktemp_boostangle);
WRITEUINT8(save_p, players[i].numboosts);
WRITEFIXED(save_p, players[i].boostpower);
WRITEFIXED(save_p, players[i].speedboost);
WRITEFIXED(save_p, players[i].accelboost);
WRITEFIXED(save_p, players[i].handleboost);
WRITEANGLE(save_p, players[i].boostangle);
WRITEFIXED(save_p, players[i].ktemp_draftpower);
WRITEUINT16(save_p, players[i].ktemp_draftleeway);
WRITESINT8(save_p, players[i].ktemp_lastdraft);
WRITEFIXED(save_p, players[i].draftpower);
WRITEUINT16(save_p, players[i].draftleeway);
WRITESINT8(save_p, players[i].lastdraft);
WRITEUINT16(save_p, players[i].ktemp_itemroulette);
WRITEUINT8(save_p, players[i].ktemp_roulettetype);
WRITEUINT16(save_p, players[i].itemroulette);
WRITEUINT8(save_p, players[i].roulettetype);
WRITESINT8(save_p, players[i].ktemp_itemtype);
WRITEUINT8(save_p, players[i].ktemp_itemamount);
WRITESINT8(save_p, players[i].ktemp_throwdir);
WRITESINT8(save_p, players[i].itemtype);
WRITEUINT8(save_p, players[i].itemamount);
WRITESINT8(save_p, players[i].throwdir);
WRITEUINT8(save_p, players[i].ktemp_sadtimer);
WRITEUINT8(save_p, players[i].sadtimer);
WRITEINT16(save_p, players[i].rings);
WRITEUINT8(save_p, players[i].ktemp_pickuprings);
WRITEUINT8(save_p, players[i].ktemp_ringdelay);
WRITEUINT16(save_p, players[i].ktemp_ringboost);
WRITEUINT8(save_p, players[i].ktemp_sparkleanim);
WRITEUINT8(save_p, players[i].ktemp_superring);
WRITEUINT8(save_p, players[i].pickuprings);
WRITEUINT8(save_p, players[i].ringdelay);
WRITEUINT16(save_p, players[i].ringboost);
WRITEUINT8(save_p, players[i].sparkleanim);
WRITEUINT8(save_p, players[i].superring);
WRITEUINT8(save_p, players[i].ktemp_curshield);
WRITEUINT8(save_p, players[i].ktemp_bubblecool);
WRITEUINT8(save_p, players[i].ktemp_bubbleblowup);
WRITEUINT16(save_p, players[i].ktemp_flamedash);
WRITEUINT16(save_p, players[i].ktemp_flamemeter);
WRITEUINT8(save_p, players[i].ktemp_flamelength);
WRITEUINT8(save_p, players[i].curshield);
WRITEUINT8(save_p, players[i].bubblecool);
WRITEUINT8(save_p, players[i].bubbleblowup);
WRITEUINT16(save_p, players[i].flamedash);
WRITEUINT16(save_p, players[i].flamemeter);
WRITEUINT8(save_p, players[i].flamelength);
WRITEUINT16(save_p, players[i].ktemp_hyudorotimer);
WRITESINT8(save_p, players[i].ktemp_stealingtimer);
WRITEUINT16(save_p, players[i].hyudorotimer);
WRITESINT8(save_p, players[i].stealingtimer);
WRITEUINT16(save_p, players[i].ktemp_sneakertimer);
WRITEUINT8(save_p, players[i].ktemp_numsneakers);
WRITEUINT8(save_p, players[i].ktemp_floorboost);
WRITEUINT16(save_p, players[i].sneakertimer);
WRITEUINT8(save_p, players[i].numsneakers);
WRITEUINT8(save_p, players[i].floorboost);
WRITEINT16(save_p, players[i].ktemp_growshrinktimer);
WRITEUINT16(save_p, players[i].ktemp_rocketsneakertimer);
WRITEUINT16(save_p, players[i].ktemp_invincibilitytimer);
WRITEINT16(save_p, players[i].growshrinktimer);
WRITEUINT16(save_p, players[i].rocketsneakertimer);
WRITEUINT16(save_p, players[i].invincibilitytimer);
WRITEUINT8(save_p, players[i].ktemp_eggmanexplode);
WRITESINT8(save_p, players[i].ktemp_eggmanblame);
WRITEUINT8(save_p, players[i].eggmanexplode);
WRITESINT8(save_p, players[i].eggmanblame);
WRITEUINT8(save_p, players[i].ktemp_bananadrag);
WRITEUINT8(save_p, players[i].bananadrag);
WRITESINT8(save_p, players[i].ktemp_lastjawztarget);
WRITEUINT8(save_p, players[i].ktemp_jawztargetdelay);
WRITESINT8(save_p, players[i].lastjawztarget);
WRITEUINT8(save_p, players[i].jawztargetdelay);
WRITEUINT8(save_p, players[i].trickpanel);
WRITEUINT32(save_p, players[i].trickmomx);
@ -309,7 +309,7 @@ static void P_NetArchivePlayers(void)
WRITEUINT32(save_p, players[i].trickmomz);
WRITEUINT32(save_p, players[i].roundscore);
WRITEUINT8(save_p, players[i].ktemp_emeralds);
WRITEUINT8(save_p, players[i].emeralds);
WRITEUINT8(save_p, players[i].bumpers);
WRITEINT16(save_p, players[i].karmadelay);
WRITEINT16(save_p, players[i].spheres);
@ -393,7 +393,7 @@ static void P_NetUnArchivePlayers(void)
players[i].pflags = READUINT32(save_p);
players[i].panim = READUINT8(save_p);
players[i].spectator = READUINT8(save_p);
players[i].ktemp_spectatewait = READUINT32(save_p);
players[i].spectatewait = READUINT32(save_p);
players[i].flashpal = READUINT16(save_p);
players[i].flashcount = READUINT16(save_p);
@ -459,99 +459,99 @@ static void P_NetUnArchivePlayers(void)
if (flags & FOLLOWER)
players[i].follower = (mobj_t *)(size_t)READUINT32(save_p);
players[i].ktemp_nocontrol = READUINT16(save_p);
players[i].ktemp_carry = READUINT8(save_p);
players[i].ktemp_dye = READUINT16(save_p);
players[i].nocontrol = READUINT16(save_p);
players[i].carry = READUINT8(save_p);
players[i].dye = READUINT16(save_p);
players[i].ktemp_position = READUINT8(save_p);
players[i].ktemp_oldposition = READUINT8(save_p);
players[i].ktemp_positiondelay = READUINT8(save_p);
players[i].position = READUINT8(save_p);
players[i].oldposition = READUINT8(save_p);
players[i].positiondelay = READUINT8(save_p);
players[i].distancetofinish = READUINT32(save_p);
players[i].nextwaypoint = (waypoint_t *)(size_t)READUINT32(save_p);
players[i].airtime = READUINT32(save_p);
players[i].ktemp_startboost = READUINT8(save_p);
players[i].startboost = READUINT8(save_p);
players[i].ktemp_flashing = READUINT16(save_p);
players[i].ktemp_spinouttimer = READUINT16(save_p);
players[i].ktemp_spinouttype = READUINT8(save_p);
players[i].ktemp_instashield = READUINT8(save_p);
players[i].ktemp_wipeoutslow = READUINT8(save_p);
players[i].ktemp_justbumped = READUINT8(save_p);
players[i].flashing = READUINT16(save_p);
players[i].spinouttimer = READUINT16(save_p);
players[i].spinouttype = READUINT8(save_p);
players[i].instashield = READUINT8(save_p);
players[i].wipeoutslow = READUINT8(save_p);
players[i].justbumped = READUINT8(save_p);
players[i].tumbleBounces = READUINT8(save_p);
players[i].tumbleHeight = READUINT16(save_p);
players[i].ktemp_drift = READSINT8(save_p);
players[i].ktemp_driftcharge = READFIXED(save_p);
players[i].ktemp_driftboost = READUINT8(save_p);
players[i].drift = READSINT8(save_p);
players[i].driftcharge = READFIXED(save_p);
players[i].driftboost = READUINT8(save_p);
players[i].ktemp_aizdriftstrat = READSINT8(save_p);
players[i].aizdriftstrat = READSINT8(save_p);
players[i].aizdrifttilt = READINT32(save_p);
players[i].aizdriftturn = READINT32(save_p);
players[i].ktemp_offroad = READFIXED(save_p);
players[i].ktemp_waterskip = READUINT8(save_p);
players[i].offroad = READFIXED(save_p);
players[i].waterskip = READUINT8(save_p);
players[i].ktemp_tiregrease = READUINT16(save_p);
players[i].ktemp_springstars = READUINT16(save_p);
players[i].ktemp_springcolor = READUINT16(save_p);
players[i].ktemp_dashpadcooldown = READUINT8(save_p);
players[i].tiregrease = READUINT16(save_p);
players[i].springstars = READUINT16(save_p);
players[i].springcolor = READUINT16(save_p);
players[i].dashpadcooldown = READUINT8(save_p);
players[i].ktemp_spindash = READUINT16(save_p);
players[i].ktemp_spindashspeed = READFIXED(save_p);
players[i].ktemp_spindashboost = READUINT8(save_p);
players[i].spindash = READUINT16(save_p);
players[i].spindashspeed = READFIXED(save_p);
players[i].spindashboost = READUINT8(save_p);
players[i].ktemp_numboosts = READUINT8(save_p);
players[i].ktemp_boostpower = READFIXED(save_p);
players[i].ktemp_speedboost = READFIXED(save_p);
players[i].ktemp_accelboost = READFIXED(save_p);
players[i].ktemp_handleboost = READFIXED(save_p);
players[i].ktemp_boostangle = READANGLE(save_p);
players[i].numboosts = READUINT8(save_p);
players[i].boostpower = READFIXED(save_p);
players[i].speedboost = READFIXED(save_p);
players[i].accelboost = READFIXED(save_p);
players[i].handleboost = READFIXED(save_p);
players[i].boostangle = READANGLE(save_p);
players[i].ktemp_draftpower = READFIXED(save_p);
players[i].ktemp_draftleeway = READUINT16(save_p);
players[i].ktemp_lastdraft = READSINT8(save_p);
players[i].draftpower = READFIXED(save_p);
players[i].draftleeway = READUINT16(save_p);
players[i].lastdraft = READSINT8(save_p);
players[i].ktemp_itemroulette = READUINT16(save_p);
players[i].ktemp_roulettetype = READUINT8(save_p);
players[i].itemroulette = READUINT16(save_p);
players[i].roulettetype = READUINT8(save_p);
players[i].ktemp_itemtype = READSINT8(save_p);
players[i].ktemp_itemamount = READUINT8(save_p);
players[i].ktemp_throwdir = READSINT8(save_p);
players[i].itemtype = READSINT8(save_p);
players[i].itemamount = READUINT8(save_p);
players[i].throwdir = READSINT8(save_p);
players[i].ktemp_sadtimer = READUINT8(save_p);
players[i].sadtimer = READUINT8(save_p);
players[i].rings = READSINT8(save_p);
players[i].ktemp_pickuprings = READUINT8(save_p);
players[i].ktemp_ringdelay = READUINT8(save_p);
players[i].ktemp_ringboost = READUINT16(save_p);
players[i].ktemp_sparkleanim = READUINT8(save_p);
players[i].ktemp_superring = READUINT8(save_p);
players[i].pickuprings = READUINT8(save_p);
players[i].ringdelay = READUINT8(save_p);
players[i].ringboost = READUINT16(save_p);
players[i].sparkleanim = READUINT8(save_p);
players[i].superring = READUINT8(save_p);
players[i].ktemp_curshield = READUINT8(save_p);
players[i].ktemp_bubblecool = READUINT8(save_p);
players[i].ktemp_bubbleblowup = READUINT8(save_p);
players[i].ktemp_flamedash = READUINT16(save_p);
players[i].ktemp_flamemeter = READUINT16(save_p);
players[i].ktemp_flamelength = READUINT8(save_p);
players[i].curshield = READUINT8(save_p);
players[i].bubblecool = READUINT8(save_p);
players[i].bubbleblowup = READUINT8(save_p);
players[i].flamedash = READUINT16(save_p);
players[i].flamemeter = READUINT16(save_p);
players[i].flamelength = READUINT8(save_p);
players[i].ktemp_hyudorotimer = READUINT16(save_p);
players[i].ktemp_stealingtimer = READSINT8(save_p);
players[i].hyudorotimer = READUINT16(save_p);
players[i].stealingtimer = READSINT8(save_p);
players[i].ktemp_sneakertimer = READUINT16(save_p);
players[i].ktemp_numsneakers = READUINT8(save_p);
players[i].ktemp_floorboost = READUINT8(save_p);
players[i].sneakertimer = READUINT16(save_p);
players[i].numsneakers = READUINT8(save_p);
players[i].floorboost = READUINT8(save_p);
players[i].ktemp_growshrinktimer = READINT16(save_p);
players[i].ktemp_rocketsneakertimer = READUINT16(save_p);
players[i].ktemp_invincibilitytimer = READUINT16(save_p);
players[i].growshrinktimer = READINT16(save_p);
players[i].rocketsneakertimer = READUINT16(save_p);
players[i].invincibilitytimer = READUINT16(save_p);
players[i].ktemp_eggmanexplode = READUINT8(save_p);
players[i].ktemp_eggmanblame = READSINT8(save_p);
players[i].eggmanexplode = READUINT8(save_p);
players[i].eggmanblame = READSINT8(save_p);
players[i].ktemp_bananadrag = READUINT8(save_p);
players[i].bananadrag = READUINT8(save_p);
players[i].ktemp_lastjawztarget = READSINT8(save_p);
players[i].ktemp_jawztargetdelay = READUINT8(save_p);
players[i].lastjawztarget = READSINT8(save_p);
players[i].jawztargetdelay = READUINT8(save_p);
players[i].trickpanel = READUINT8(save_p);
players[i].trickmomx = READUINT32(save_p);
@ -559,7 +559,7 @@ static void P_NetUnArchivePlayers(void)
players[i].trickmomz = READUINT32(save_p);
players[i].roundscore = READUINT32(save_p);
players[i].ktemp_emeralds = READUINT8(save_p);
players[i].emeralds = READUINT8(save_p);
players[i].bumpers = READUINT8(save_p);
players[i].karmadelay = READINT16(save_p);
players[i].spheres = READINT16(save_p);

View file

@ -1552,7 +1552,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
case 336: // object dye - once
{
INT32 triggercolor = (INT32)sides[triggerline->sidenum[0]].toptexture;
UINT16 color = (actor->player ? actor->player->ktemp_dye : actor->color);
UINT16 color = (actor->player ? actor->player->dye : actor->color);
boolean invert = (triggerline->flags & ML_NOCLIMB ? true : false);
if (invert ^ (triggercolor != color))
@ -1872,7 +1872,7 @@ static void K_HandleLapIncrement(player_t *player)
player->karthud[khud_laphand] = 3;
else
{
if (nump > 2 && player->ktemp_position == 1) // 1st place in 1v1 uses thumbs up
if (nump > 2 && player->position == 1) // 1st place in 1v1 uses thumbs up
player->karthud[khud_laphand] = 1;
else
player->karthud[khud_laphand] = 2;
@ -1895,7 +1895,7 @@ static void K_HandleLapIncrement(player_t *player)
if (rainbowstartavailable == true)
{
S_StartSound(player->mo, sfx_s23c);
player->ktemp_startboost = 125;
player->startboost = 125;
K_SpawnDriftBoostExplosion(player, 3);
rainbowstartavailable = false;
}
@ -1920,7 +1920,7 @@ static void K_HandleLapIncrement(player_t *player)
}
else
{
if ((player->laps > (UINT8)(cv_numlaps.value)) && (player->ktemp_position == 1))
if ((player->laps > (UINT8)(cv_numlaps.value)) && (player->position == 1))
{
// opponent finished
S_StartSound(NULL, sfx_s253);
@ -2844,7 +2844,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
fractime = 1; //instantly wears off upon leaving
if (line->flags & ML_NOCLIMB)
fractime |= 1<<15; //more crazy &ing, as if music stuff wasn't enough
mo->player->ktemp_nocontrol = fractime;
mo->player->nocontrol = fractime;
}
break;
@ -3875,7 +3875,7 @@ void P_SetupSignExit(player_t *player)
thinker_t *think;
INT32 numfound = 0;
if (player->ktemp_position != 1)
if (player->position != 1)
return;
for (; node; node = node->m_thinglist_next)
@ -4539,9 +4539,9 @@ DoneSection2:
break;
case 5: // Speed pad
if (player->ktemp_floorboost != 0)
if (player->floorboost != 0)
{
player->ktemp_floorboost = 2;
player->floorboost = 2;
break;
}
@ -4573,9 +4573,9 @@ DoneSection2:
P_InstaThrust(player->mo, lineangle, max(linespeed, 2*playerspeed));
player->ktemp_dashpadcooldown = TICRATE/3;
player->dashpadcooldown = TICRATE/3;
player->trickpanel = 0;
player->ktemp_floorboost = 2;
player->floorboost = 2;
S_StartSound(player->mo, sfx_cdfm62);
}
break;
@ -4648,10 +4648,10 @@ DoneSection2:
case 6: // SRB2kart 190117 - Sneaker Panel
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
{
if (!player->ktemp_floorboost)
player->ktemp_floorboost = 3;
if (!player->floorboost)
player->floorboost = 3;
else
player->ktemp_floorboost = 2;
player->floorboost = 2;
K_DoSneaker(player, 0);
}
break;
@ -4667,7 +4667,7 @@ DoneSection2:
mobj_t *waypoint = NULL;
angle_t an;
if (player->mo->tracer && player->mo->tracer->type == MT_TUBEWAYPOINT && player->ktemp_carry == CR_ZOOMTUBE)
if (player->mo->tracer && player->mo->tracer->type == MT_TUBEWAYPOINT && player->carry == CR_ZOOMTUBE)
break;
// Find line #3 tagged to this sector
@ -4707,7 +4707,7 @@ DoneSection2:
break; // behind back
P_SetTarget(&player->mo->tracer, waypoint);
player->ktemp_carry = CR_ZOOMTUBE;
player->carry = CR_ZOOMTUBE;
player->speed = speed;
}
break;
@ -4720,7 +4720,7 @@ DoneSection2:
mobj_t *waypoint = NULL;
angle_t an;
if (player->mo->tracer && player->mo->tracer->type == MT_TUBEWAYPOINT && player->ktemp_carry == CR_ZOOMTUBE)
if (player->mo->tracer && player->mo->tracer->type == MT_TUBEWAYPOINT && player->carry == CR_ZOOMTUBE)
break;
// Find line #11 tagged to this sector
@ -4760,7 +4760,7 @@ DoneSection2:
break; // behind back
P_SetTarget(&player->mo->tracer, waypoint);
player->ktemp_carry = CR_ZOOMTUBE;
player->carry = CR_ZOOMTUBE;
player->speed = speed;
}
break;
@ -8501,8 +8501,8 @@ void T_Pusher(pusher_t *p)
continue;
if (thing->player && (thing->state == &states[thing->info->painstate])
&& (thing->player->ktemp_flashing > (K_GetKartFlashing(thing->player)/4)*3
&& thing->player->ktemp_flashing <= K_GetKartFlashing(thing->player)))
&& (thing->player->flashing > (K_GetKartFlashing(thing->player)/4)*3
&& thing->player->flashing <= K_GetKartFlashing(thing->player)))
continue;
inFOF = touching = moved = false;
@ -8630,11 +8630,11 @@ void T_Pusher(pusher_t *p)
if (moved)
{
if (p->slider && thing->player && !thing->player->ktemp_carry)
if (p->slider && thing->player && !thing->player->carry)
{
P_ResetPlayer (thing->player);
thing->player->ktemp_carry = CR_SLIDING;
thing->player->carry = CR_SLIDING;
thing->angle = R_PointToAngle2 (0, 0, xspeed<<(FRACBITS-PUSH_FACTOR), yspeed<<(FRACBITS-PUSH_FACTOR));
if (!demo.playback)

View file

@ -338,7 +338,7 @@ void P_GiveEmerald(boolean spawnObj)
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
// Make sure we're not being carried before our tracer is changed
players[i].ktemp_carry = CR_NONE;
players[i].carry = CR_NONE;
P_SetTarget(&players[i].mo->tracer, emmo);
@ -444,11 +444,11 @@ UINT8 P_FindHighestLap(void)
// P_PlayerInPain
//
// Is player in pain??
// Checks for painstate and ktemp_flashing, if both found return true
// Checks for painstate and flashing, if both found return true
//
boolean P_PlayerInPain(player_t *player)
{
if (player->ktemp_spinouttimer || (player->tumbleBounces > 0) || (player->pflags & PF_FAULT))
if (player->spinouttimer || (player->tumbleBounces > 0) || (player->pflags & PF_FAULT))
return true;
return false;
@ -462,10 +462,10 @@ void P_ResetPlayer(player_t *player)
{
//player->pflags &= ~(PF_);
player->ktemp_carry = CR_NONE;
player->carry = CR_NONE;
player->onconveyor = 0;
//player->ktemp_drift = player->ktemp_driftcharge = 0;
//player->drift = player->driftcharge = 0;
player->trickpanel = 0;
}
@ -656,7 +656,7 @@ boolean P_EvaluateMusicStatus(UINT16 status, const char *musname)
void P_PlayRinglossSound(mobj_t *source)
{
if (source->player && K_GetShieldFromItem(source->player->ktemp_itemtype) != KSHIELD_NONE)
if (source->player && K_GetShieldFromItem(source->player->itemtype) != KSHIELD_NONE)
S_StartSound(source, sfx_s1a3); // Shield hit (no ring loss)
else if (source->player && source->player->rings <= 0)
S_StartSound(source, sfx_s1a6); // Ring debt (lessened ring loss)
@ -704,12 +704,12 @@ boolean P_EndingMusic(player_t *player)
return false;
bestlocalplayer = &players[displayplayers[0]];
bestlocalpos = ((players[displayplayers[0]].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[displayplayers[0]].ktemp_position);
bestlocalpos = ((players[displayplayers[0]].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[displayplayers[0]].position);
#define setbests(p) \
if (((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].ktemp_position) < bestlocalpos) \
if (((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].position) < bestlocalpos) \
{ \
bestlocalplayer = &players[p]; \
bestlocalpos = ((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].ktemp_position); \
bestlocalpos = ((players[p].pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : players[p].position); \
}
setbests(displayplayers[1]);
if (r_splitscreen > 1)
@ -724,7 +724,7 @@ boolean P_EndingMusic(player_t *player)
return false;
bestlocalplayer = player;
bestlocalpos = ((player->pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : player->ktemp_position);
bestlocalpos = ((player->pflags & PF_NOCONTEST) ? MAXPLAYERS+1 : player->position);
}
if ((gametyperules & GTR_CIRCUIT) && bestlocalpos == MAXPLAYERS+1)
@ -795,10 +795,10 @@ void P_RestoreMusic(player_t *player)
#define setbests(p) \
if (players[p].playerstate == PST_LIVE) \
{ \
if (players[p].ktemp_invincibilitytimer > bestlocaltimer) \
{ wantedmus = 1; bestlocaltimer = players[p].ktemp_invincibilitytimer; } \
else if (players[p].ktemp_growshrinktimer > bestlocaltimer) \
{ wantedmus = 2; bestlocaltimer = players[p].ktemp_growshrinktimer; } \
if (players[p].invincibilitytimer > bestlocaltimer) \
{ wantedmus = 1; bestlocaltimer = players[p].invincibilitytimer; } \
else if (players[p].growshrinktimer > bestlocaltimer) \
{ wantedmus = 2; bestlocaltimer = players[p].growshrinktimer; } \
}
setbests(displayplayers[0]);
setbests(displayplayers[1]);
@ -812,9 +812,9 @@ void P_RestoreMusic(player_t *player)
{
if (player->playerstate == PST_LIVE)
{
if (player->ktemp_invincibilitytimer > 1)
if (player->invincibilitytimer > 1)
wantedmus = 1;
else if (player->ktemp_growshrinktimer > 1)
else if (player->growshrinktimer > 1)
wantedmus = 2;
}
}
@ -1594,13 +1594,13 @@ static void P_CheckQuicksand(player_t *player)
//
static void P_CheckInvincibilityTimer(player_t *player)
{
if (!player->ktemp_invincibilitytimer)
if (!player->invincibilitytimer)
return;
player->mo->color = (UINT16)(SKINCOLOR_PINK + (leveltime % (numskincolors - SKINCOLOR_PINK)));
// Resume normal music stuff.
if (player->ktemp_invincibilitytimer == 1)
if (player->invincibilitytimer == 1)
{
player->mo->color = player->skincolor;
G_GhostAddColor((INT32) (player - players), GHC_NORMAL);
@ -1677,10 +1677,10 @@ static void P_3dMovement(player_t *player)
// Get the old momentum; this will be needed at the end of the function! -SH
oldMagnitude = R_PointToDist2(player->mo->momx - player->cmomx, player->mo->momy - player->cmomy, 0, 0);
if (player->ktemp_drift != 0)
movepushangle = player->mo->angle-(ANGLE_45/5)*player->ktemp_drift;
else if (player->ktemp_spinouttimer || player->ktemp_wipeoutslow) // if spun out, use the boost angle
movepushangle = (angle_t)player->ktemp_boostangle;
if (player->drift != 0)
movepushangle = player->mo->angle-(ANGLE_45/5)*player->drift;
else if (player->spinouttimer || player->wipeoutslow) // if spun out, use the boost angle
movepushangle = (angle_t)player->boostangle;
else
movepushangle = player->mo->angle;
@ -1719,7 +1719,7 @@ static void P_3dMovement(player_t *player)
//{ SRB2kart 220217 - Toaster Code for misplaced thrust
#if 0
if (!player->ktemp_drift) // Not Drifting
if (!player->drift) // Not Drifting
{
angle_t difference = dangle/2;
boolean reverse = (dangle >= ANGLE_90);
@ -1937,7 +1937,7 @@ void P_MovePlayer(player_t *player)
runspd = FixedMul(runspd, player->mo->movefactor);
// Control relinquishing stuff!
if (player->ktemp_nocontrol)
if (player->nocontrol)
player->pflags |= PF_STASIS;
// note: don't unset stasis here
@ -1988,15 +1988,15 @@ void P_MovePlayer(player_t *player)
player->mo->rollangle = 0;
}
}
else if (player->ktemp_carry == CR_SLIDING)
else if (player->carry == CR_SLIDING)
{
P_SetPlayerMobjState(player->mo, S_KART_SPINOUT);
player->drawangle -= ANGLE_22h;
player->mo->rollangle = 0;
}
else if ((player->pflags & PF_FAULT) || (player->ktemp_spinouttimer > 0))
else if ((player->pflags & PF_FAULT) || (player->spinouttimer > 0))
{
UINT16 speed = ((player->pflags & PF_FAULT) ? player->ktemp_nocontrol : player->ktemp_spinouttimer)/8;
UINT16 speed = ((player->pflags & PF_FAULT) ? player->nocontrol : player->spinouttimer)/8;
if (speed > 8)
speed = 8;
else if (speed < 1)
@ -2015,7 +2015,7 @@ void P_MovePlayer(player_t *player)
{
P_SetPlayerMobjState(player->mo, S_KART_SPINOUT);
if (((player->ktemp_nocontrol + 5) % 20) < 10)
if (((player->nocontrol + 5) % 20) < 10)
player->drawangle += ANGLE_11hh;
else
player->drawangle -= ANGLE_11hh;
@ -2042,9 +2042,9 @@ void P_MovePlayer(player_t *player)
{
player->drawangle += player->aizdriftturn;
}
else if (player->ktemp_drift != 0)
else if (player->drift != 0)
{
INT32 a = (ANGLE_45 / 5) * player->ktemp_drift;
INT32 a = (ANGLE_45 / 5) * player->drift;
player->drawangle += a;
}
}
@ -2058,13 +2058,13 @@ void P_MovePlayer(player_t *player)
// Drifting sound
// Start looping the sound now.
if (leveltime % 50 == 0 && onground && player->ktemp_drift != 0)
if (leveltime % 50 == 0 && onground && player->drift != 0)
S_StartSound(player->mo, sfx_drift);
// Leveltime being 50 might take a while at times. We'll start it up once, isntantly.
else if (!S_SoundPlaying(player->mo, sfx_drift) && onground && player->ktemp_drift != 0)
else if (!S_SoundPlaying(player->mo, sfx_drift) && onground && player->drift != 0)
S_StartSound(player->mo, sfx_drift);
// Ok, we'll stop now.
else if (player->ktemp_drift == 0)
else if (player->drift == 0)
S_StopSoundByID(player->mo, sfx_drift);
K_MoveKartPlayer(player, onground);
@ -2077,7 +2077,7 @@ void P_MovePlayer(player_t *player)
if (((!(player->mo->eflags & MFE_VERTICALFLIP) && player->mo->z + player->mo->height >= player->mo->watertop && player->mo->z <= player->mo->watertop)
|| (player->mo->eflags & MFE_VERTICALFLIP && player->mo->z + player->mo->height >= player->mo->waterbottom && player->mo->z <= player->mo->waterbottom))
&& (player->speed > runspd)
&& player->mo->momz == 0 && player->ktemp_carry != CR_SLIDING && !player->spectator)
&& player->mo->momz == 0 && player->carry != CR_SLIDING && !player->spectator)
{
fixed_t trailScale = FixedMul(FixedDiv(player->speed - runspd, K_GetKartSpeed(player, false) - runspd), mapobjectscale);
fixed_t playerTopSpeed = K_GetKartSpeed(player, false);
@ -2161,14 +2161,14 @@ void P_MovePlayer(player_t *player)
////////////////////////////
// SRB2kart - Drifting smoke and fire
if ((player->ktemp_sneakertimer || player->ktemp_flamedash)
if ((player->sneakertimer || player->flamedash)
&& onground && (leveltime & 1))
K_SpawnBoostTrail(player);
if (player->ktemp_invincibilitytimer > 0)
if (player->invincibilitytimer > 0)
K_SpawnSparkleTrail(player->mo);
if (player->ktemp_wipeoutslow > 1 && (leveltime & 1))
if (player->wipeoutslow > 1 && (leveltime & 1))
K_SpawnWipeoutTrail(player->mo, false);
K_DriftDustHandling(player->mo);
@ -2221,7 +2221,7 @@ static void P_DoZoomTube(player_t *player)
else
reverse = true;
player->ktemp_flashing = 1;
player->flashing = 1;
speed = abs(player->speed);
@ -2279,7 +2279,7 @@ static void P_DoZoomTube(player_t *player)
else
{
P_SetTarget(&player->mo->tracer, NULL); // Else, we just let them fly.
player->ktemp_carry = CR_NONE;
player->carry = CR_NONE;
CONS_Debug(DBG_GAMELOGIC, "Next waypoint not found, releasing from track...\n");
}
@ -3072,11 +3072,11 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
pan = xpan = ypan = 0;
else
{
if (player->ktemp_drift != 0)
if (player->drift != 0)
{
fixed_t panmax = (dist/5);
INT32 driftval = K_GetKartDriftSparkValue(player);
INT32 dc = player->ktemp_driftcharge;
INT32 dc = player->driftcharge;
if (dc > driftval || dc < 0)
dc = driftval;
@ -3085,7 +3085,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (pan > panmax)
pan = panmax;
if (player->ktemp_drift < 0)
if (player->drift < 0)
pan *= -1;
}
else
@ -3420,7 +3420,7 @@ boolean P_SpectatorJoinGame(player_t *player)
{
if (P_IsLocalPlayer(player))
CONS_Printf(M_GetText("Server does not allow team change.\n"));
//player->ktemp_flashing = TICRATE + 1; //to prevent message spam.
//player->flashing = TICRATE + 1; //to prevent message spam.
}
// Team changing in Team Match and CTF
// Pressing fire assigns you to a team that needs players if allowed.
@ -3462,7 +3462,7 @@ boolean P_SpectatorJoinGame(player_t *player)
}
player->spectator = false;
player->pflags &= ~PF_WANTSTOJOIN;
player->ktemp_spectatewait = 0;
player->spectatewait = 0;
player->ctfteam = changeto;
player->playerstate = PST_REBORN;
@ -3492,7 +3492,7 @@ boolean P_SpectatorJoinGame(player_t *player)
}
player->spectator = false;
player->pflags &= ~PF_WANTSTOJOIN;
player->ktemp_spectatewait = 0;
player->spectatewait = 0;
player->playerstate = PST_REBORN;
//Reset away view
@ -3966,7 +3966,7 @@ static void P_HandleFollower(player_t *player)
// handle follower animations. Could probably be better...
// hurt or dead
if (player->ktemp_spinouttimer || player->mo->state == &states[S_KART_SPINOUT] || player->mo->health <= 0)
if (player->spinouttimer || player->mo->state == &states[S_KART_SPINOUT] || player->mo->health <= 0)
{
player->follower->movecount = 0; // cancel hit confirm.
player->follower->angle = player->drawangle; // spin out
@ -4178,15 +4178,15 @@ void P_PlayerThink(player_t *player)
// to allow items to be thrown forward or backward.
if (cmd->buttons & BT_FORWARD)
{
player->ktemp_throwdir = 1;
player->throwdir = 1;
}
else if (cmd->buttons & BT_BACKWARD)
{
player->ktemp_throwdir = -1;
player->throwdir = -1;
}
else
{
player->ktemp_throwdir = 0;
player->throwdir = 0;
}
// Accessibility - kickstart your acceleration
@ -4309,7 +4309,7 @@ void P_PlayerThink(player_t *player)
// SRB2kart 010217
if (leveltime < introtime)
{
player->ktemp_nocontrol = 2;
player->nocontrol = 2;
}
// Synchronizes the "real" amount of time spent in the level.
@ -4334,10 +4334,10 @@ void P_PlayerThink(player_t *player)
}
}
if ((netgame || multiplayer) && player->spectator && cmd->buttons & BT_ATTACK && !player->ktemp_flashing)
if ((netgame || multiplayer) && player->spectator && cmd->buttons & BT_ATTACK && !player->flashing)
{
player->pflags ^= PF_WANTSTOJOIN;
player->ktemp_flashing = TICRATE/2 + 1;
player->flashing = TICRATE/2 + 1;
/*if (P_SpectatorJoinGame(player))
return; // player->mo was removed.*/
}
@ -4400,28 +4400,28 @@ void P_PlayerThink(player_t *player)
// Time Bonus & Ring Bonus count settings
// Strength counts up to diminish fade.
if (player->ktemp_flashing && player->ktemp_flashing < UINT16_MAX &&
if (player->flashing && player->flashing < UINT16_MAX &&
(player->spectator || !P_PlayerInPain(player)))
{
player->ktemp_flashing--;
player->flashing--;
}
if (player->ktemp_nocontrol && player->ktemp_nocontrol < UINT16_MAX)
if (player->nocontrol && player->nocontrol < UINT16_MAX)
{
if (!(--player->ktemp_nocontrol))
if (!(--player->nocontrol))
player->pflags &= ~PF_FAULT;
}
else
player->ktemp_nocontrol = 0;
player->nocontrol = 0;
// Flash player after being hit.
if (!(player->ktemp_hyudorotimer // SRB2kart - fixes Hyudoro not flashing when it should.
|| player->ktemp_growshrinktimer > 0 // Grow doesn't flash either.
if (!(player->hyudorotimer // SRB2kart - fixes Hyudoro not flashing when it should.
|| player->growshrinktimer > 0 // Grow doesn't flash either.
|| (player->respawn.state != RESPAWNST_NONE) // Respawn timer (for drop dash effect)
|| (player->pflags & PF_NOCONTEST) // NO CONTEST explosion
|| ((gametyperules & GTR_BUMPERS) && player->bumpers <= 0 && player->karmadelay)))
{
if (player->ktemp_flashing > 0 && player->ktemp_flashing < K_GetKartFlashing(player)
if (player->flashing > 0 && player->flashing < K_GetKartFlashing(player)
&& (leveltime & 1))
player->mo->renderflags |= RF_DONTDRAW;
else
@ -4492,8 +4492,8 @@ void P_PlayerThink(player_t *player)
LUAh_PlayerThink(player);
if (player->ktemp_carry == CR_SLIDING)
player->ktemp_carry = CR_NONE;
if (player->carry == CR_SLIDING)
player->carry = CR_NONE;
}
//
@ -4652,5 +4652,5 @@ void P_ForceLocalAngle(player_t *player, angle_t angle)
boolean P_PlayerFullbright(player_t *player)
{
return (player->ktemp_invincibilitytimer > 0);
return (player->invincibilitytimer > 0);
}

View file

@ -909,7 +909,7 @@ static void ST_overlayDrawer(void)
{
const char *itemtxt = M_GetText("Item - Join Game");
if (stplyr->ktemp_flashing)
if (stplyr->flashing)
itemtxt = M_GetText("Item - . . .");
else if (stplyr->pflags & PF_WANTSTOJOIN)
itemtxt = M_GetText("Item - Cancel Join");