Constantinople

This commit is contained in:
GenericHeroGuy 2025-08-30 17:06:42 +02:00
parent 68a644fe2f
commit e8d43ec8a3
9 changed files with 101 additions and 101 deletions

View file

@ -406,7 +406,7 @@ boolean K_PlayerUsesBotMovement(const player_t *player)
See header file for description.
--------------------------------------------------*/
boolean K_BotCanTakeCut(player_t *player)
boolean K_BotCanTakeCut(const player_t *player)
{
if (
(K_TripwirePassConditions(player) != TRIPWIRE_NONE || K_ApplyOffroad(player) == false)
@ -493,7 +493,7 @@ static fixed_t K_BotSpeedScaled(const player_t *player, fixed_t speed)
See header file for description.
--------------------------------------------------*/
const botcontroller_t *K_GetBotController(mobj_t *mobj)
const botcontroller_t *K_GetBotController(const mobj_t *mobj)
{
botcontroller_t *ret = nullptr;
@ -875,7 +875,7 @@ static fixed_t K_ScaleWPDistWithSlope(fixed_t disttonext, angle_t angletonext, c
}
// Calculates a point further along the track to attempt to drive towards.
static boolean K_CreateBotPrediction(botdata_t *bd, player_t *player)
static boolean K_CreateBotPrediction(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -1215,7 +1215,7 @@ static void K_BotStartDrift(botdata_t *bd, player_t* player)
}
// Determines inputs for standard track driving.
static INT32 K_HandleBotTrack(botdata_t *bd, player_t *player, angle_t destangle)
static INT32 K_HandleBotTrack(botdata_t *bd, const player_t *player, angle_t destangle)
{
ZoneScoped;
@ -1392,7 +1392,7 @@ static void K_IncrementBotRespawn(player_t *player, UINT8 *respawn, const UINT8
Return:-
New value for turn amount.
--------------------------------------------------*/
/*static INT32 K_HandleBotReverse(player_t *player, ticcmd_t *cmd, botprediction_t *predict, angle_t destangle)
/*static INT32 K_HandleBotReverse(const player_t *player, ticcmd_t *cmd, botprediction_t *predict, angle_t destangle)
{
ZoneScoped;

View file

@ -119,7 +119,7 @@ boolean K_PlayerUsesBotMovement(const player_t *player);
/*--------------------------------------------------
boolean K_BotCanTakeCut(player_t *player);
boolean K_BotCanTakeCut(const player_t *player);
Tells if this bot is able to take shortcuts (currently unaffected by offroad,
or has certain items ready).
@ -131,11 +131,11 @@ boolean K_PlayerUsesBotMovement(const player_t *player);
true if able to take shortcuts, otherwise false.
--------------------------------------------------*/
boolean K_BotCanTakeCut(player_t *player);
boolean K_BotCanTakeCut(const player_t *player);
/*--------------------------------------------------
const botcontroller_t *K_GetBotController(mobj_t *mobj);
const botcontroller_t *K_GetBotController(const mobj_t *mobj);
Retrieves the current bot controller values from
the player's current sector.
@ -147,7 +147,7 @@ boolean K_BotCanTakeCut(player_t *player);
Pointer to the sector's bot controller struct.
--------------------------------------------------*/
const botcontroller_t *K_GetBotController(mobj_t *mobj);
const botcontroller_t *K_GetBotController(const mobj_t *mobj);
/*--------------------------------------------------
@ -310,7 +310,7 @@ UINT8 K_EggboxStealth(fixed_t x, fixed_t y);
/*--------------------------------------------------
boolean K_BotHatesThisSector(player_t *player, sector_t *sec, fixed_t x, fixed_t y)
boolean K_BotHatesThisSector(const player_t *player, sector_t *sec, fixed_t x, fixed_t y)
Tells us if a bot will play more careful around
this sector. Checks FOFs in the sector, as well.
@ -325,7 +325,7 @@ UINT8 K_EggboxStealth(fixed_t x, fixed_t y);
true if avoiding this sector, false otherwise.
--------------------------------------------------*/
boolean K_BotHatesThisSector(player_t *player, sector_t *sec, fixed_t x, fixed_t y);
boolean K_BotHatesThisSector(const player_t *player, sector_t *sec, fixed_t x, fixed_t y);
// Moves the bot's prediction, based on objects around the bot.
void K_NudgePredictionTowardsObjects(botdata_t *bd, const player_t *player);
@ -396,7 +396,7 @@ void K_UpdateBotGameplayVarsItemUsage(player_t *player);
void K_UpdateBotGameplayVars(player_t *player);
// Item usage part of ticcmd generation.
void K_BotItemUsage(botdata_t *bd, player_t *player);
void K_BotItemUsage(botdata_t *bd, const player_t *player);
void K_BotRespawn(player_t *player);

View file

@ -374,7 +374,7 @@ static boolean K_BotRevealsGenericTrap(botdata_t *bd, const player_t *player, bo
// Item usage for Eggman shields.
// mine - Set to true to handle Mine-specific behaviors.
static void K_BotItemGenericTrapShield(botdata_t *bd, player_t *player, boolean mine)
static void K_BotItemGenericTrapShield(botdata_t *bd, const player_t *player, boolean mine)
{
ZoneScoped;
@ -392,7 +392,7 @@ static void K_BotItemGenericTrapShield(botdata_t *bd, player_t *player, boolean
}
// Item usage for orbitting shields.
static void K_BotItemGenericOrbitShield(botdata_t *bd, player_t *player)
static void K_BotItemGenericOrbitShield(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -405,7 +405,7 @@ static void K_BotItemGenericOrbitShield(botdata_t *bd, player_t *player)
}
// Item usage for sneakers.
static void K_BotItemSneaker(botdata_t *bd, player_t *player)
static void K_BotItemSneaker(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -434,7 +434,7 @@ static void K_BotItemSneaker(botdata_t *bd, player_t *player)
}
// Item usage for rocket sneakers.
static void K_BotItemRocketSneaker(botdata_t *bd, player_t *player)
static void K_BotItemRocketSneaker(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -459,7 +459,7 @@ static void K_BotItemRocketSneaker(botdata_t *bd, player_t *player)
}
// Item usage for trap item throwing.
static void K_BotItemBanana(botdata_t *bd, player_t *player)
static void K_BotItemBanana(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -506,7 +506,7 @@ static void K_BotItemBanana(botdata_t *bd, player_t *player)
}
// Item usage for trap item throwing.
static void K_BotItemMine(botdata_t *bd, player_t *player)
static void K_BotItemMine(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -559,7 +559,7 @@ static void K_BotItemMine(botdata_t *bd, player_t *player)
}
// Item usage for landmine tossing.
static void K_BotItemLandmine(botdata_t *bd, player_t *player)
static void K_BotItemLandmine(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -587,7 +587,7 @@ static void K_BotItemLandmine(botdata_t *bd, player_t *player)
}
// Item usage for Eggman item throwing.
static void K_BotItemEggman(botdata_t *bd, player_t *player)
static void K_BotItemEggman(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -674,7 +674,7 @@ static boolean K_BotRevealsEggbox(const player_t *player)
}
// Item usage for Eggman shields.
static void K_BotItemEggmanShield(botdata_t *bd, player_t *player)
static void K_BotItemEggmanShield(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -692,7 +692,7 @@ static void K_BotItemEggmanShield(botdata_t *bd, player_t *player)
}
// Item usage for Eggman explosions.
static void K_BotItemEggmanExplosion(botdata_t *bd, player_t *player)
static void K_BotItemEggmanExplosion(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -707,7 +707,7 @@ static void K_BotItemEggmanExplosion(botdata_t *bd, player_t *player)
}
// Item usage for Orbinaut throwing.
static void K_BotItemOrbinaut(botdata_t *bd, player_t *player)
static void K_BotItemOrbinaut(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -756,7 +756,7 @@ static void K_BotItemOrbinaut(botdata_t *bd, player_t *player)
}
// Item usage for Ballhog throwing.
static void K_BotItemBallhog(botdata_t *bd, player_t *player)
static void K_BotItemBallhog(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -821,7 +821,7 @@ static void K_BotItemBallhog(botdata_t *bd, player_t *player)
}
// Item usage for Jawz throwing.
static void K_BotItemJawz(botdata_t *bd, player_t *player)
static void K_BotItemJawz(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -892,7 +892,7 @@ static void K_BotItemJawz(botdata_t *bd, player_t *player)
}
// Item usage for Lightning Shield.
static void K_BotItemLightning(botdata_t *bd, player_t *player)
static void K_BotItemLightning(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -913,7 +913,7 @@ static void K_BotItemLightning(botdata_t *bd, player_t *player)
}
// Item usage for Bubble Shield.
static void K_BotItemBubble(botdata_t *bd, player_t *player)
static void K_BotItemBubble(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -982,7 +982,7 @@ static void K_BotItemBubble(botdata_t *bd, player_t *player)
}
// Item usage for Flame Shield.
static void K_BotItemFlame(botdata_t *bd, player_t *player)
static void K_BotItemFlame(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -1025,7 +1025,7 @@ static void K_BotItemFlame(botdata_t *bd, player_t *player)
}
// Item usage for rings.
static void K_BotItemRings(botdata_t *bd, player_t *player)
static void K_BotItemRings(botdata_t *bd, const player_t *player)
{
ZoneScoped;
@ -1087,7 +1087,7 @@ static void K_BotItemRings(botdata_t *bd, player_t *player)
Return:-
Returns the useodds of this bot.
--------------------------------------------------*/
static UINT32 K_BotCalculateUseodds(player_t *player)
static UINT32 K_BotCalculateUseodds(const player_t *player)
{
UINT32 pdis = 0;
UINT8 pingame = 0, bestbumper = 0;
@ -1134,7 +1134,7 @@ static UINT32 K_BotCalculateUseodds(player_t *player)
}
// Item usage for item roulette mashing.
static void K_BotItemRouletteMash(botdata_t *bd, player_t *player)
static void K_BotItemRouletteMash(botdata_t *bd, const player_t *player)
{
boolean mash = false;
UINT32 useodds = 0;
@ -1186,7 +1186,7 @@ static void K_BotItemRouletteMash(botdata_t *bd, player_t *player)
}
// See header file for description.
void K_BotItemUsage(botdata_t *bd, player_t *player)
void K_BotItemUsage(botdata_t *bd, const player_t *player)
{
ZoneScoped;

View file

@ -137,7 +137,7 @@ UINT8 K_EggboxStealth(fixed_t x, fixed_t y)
Return:-
true if avoiding this sector special, false otherwise.
--------------------------------------------------*/
static boolean K_BotHatesThisSectorsSpecial(player_t *player, sector_t *sec, const boolean flip)
static boolean K_BotHatesThisSectorsSpecial(const player_t *player, sector_t *sec, const boolean flip)
{
terrain_t *terrain = K_GetTerrainForFlatNum(flip ? sec->ceilingpic : sec->floorpic);
@ -174,7 +174,7 @@ static boolean K_BotHatesThisSectorsSpecial(player_t *player, sector_t *sec, con
See header file for description.
--------------------------------------------------*/
boolean K_BotHatesThisSector(player_t *player, sector_t *sec, fixed_t x, fixed_t y)
boolean K_BotHatesThisSector(const player_t *player, sector_t *sec, fixed_t x, fixed_t y)
{
const boolean flip = (player->mo->eflags & MFE_VERTICALFLIP);
fixed_t highestfloor = INT32_MAX;

View file

@ -1221,7 +1221,7 @@ INT32 K_KartGetLegacyItemOdds(UINT8 pos, SINT8 item, fixed_t clusterDist, fixed_
//{ SRB2kart Roulette Code - Distance Based, yes waypoints
UINT8 K_FindUseodds(player_t *player, fixed_t mashed, UINT32 pdis, UINT8 bestbumper, boolean spbrush)
UINT8 K_FindUseodds(const player_t *player, fixed_t mashed, UINT32 pdis, UINT8 bestbumper, boolean spbrush)
{
UINT8 i;
UINT8 useodds = 0;
@ -3435,7 +3435,7 @@ void K_MomentumToFacing(player_t *player)
player->mo->momy = FixedMul(player->mo->momy - player->cmomy, player->mo->friction) + player->cmomy;
}
boolean K_ApplyOffroad(player_t *player)
boolean K_ApplyOffroad(const player_t *player)
{
boolean sneakertimer = CANTCHAINOFFROAD ? (player->sneakertimer && player->realsneakertimer) : player->sneakertimer > 0;
@ -3447,7 +3447,7 @@ boolean K_ApplyOffroad(player_t *player)
return true;
}
fixed_t K_PlayerTripwireSpeedThreshold(player_t *player)
fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player)
{
fixed_t required_speed = 2 * K_GetKartSpeed(player, false, false); // 200%
@ -3471,7 +3471,7 @@ fixed_t K_PlayerTripwireSpeedThreshold(player_t *player)
return required_speed;
}
tripwirepass_t K_TripwirePassConditions(player_t *player)
tripwirepass_t K_TripwirePassConditions(const player_t *player)
{
if (
player->invincibilitytimer ||
@ -3494,7 +3494,7 @@ tripwirepass_t K_TripwirePassConditions(player_t *player)
return TRIPWIRE_NONE;
}
boolean K_TripwirePass(player_t *player)
boolean K_TripwirePass(const player_t *player)
{
return (player->tripwirePass != TRIPWIRE_NONE);
}
@ -4159,7 +4159,7 @@ fixed_t K_GetKartSpeedFromStat(UINT8 kartspeed, boolean karmabomb)
return finalspeed;
}
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower, boolean dorubberband)
fixed_t K_GetKartSpeed(const player_t *player, boolean doboostpower, boolean dorubberband)
{
boolean karmabomb = ((gametyperules & GTR_KARMA) && player->bumper <= 0);
fixed_t finalspeed;
@ -4199,7 +4199,7 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower, boolean dorubberb
return finalspeed;
}
fixed_t K_GetKartAccel(player_t *player)
fixed_t K_GetKartAccel(const player_t *player)
{
fixed_t k_accel = 32; // 36;
UINT8 kartspeed = player->kartspeed;
@ -4212,7 +4212,7 @@ fixed_t K_GetKartAccel(player_t *player)
return FixedMul(k_accel, FRACUNIT+player->accelboost);
}
UINT16 K_GetKartFlashing(player_t *player)
UINT16 K_GetKartFlashing(const player_t *player)
{
UINT16 tics = flashingtics;
@ -4225,7 +4225,7 @@ UINT16 K_GetKartFlashing(player_t *player)
return tics;
}
boolean K_PlayerShrinkCheat(player_t *player)
boolean K_PlayerShrinkCheat(const player_t *player)
{
if (cv_kartdebugshrink.value)
return true;
@ -4256,20 +4256,20 @@ void K_UpdateShrinkCheat(player_t *player)
}
}
boolean K_KartKickstart(player_t *player)
boolean K_KartKickstart(const player_t *player)
{
return ((player->pflags & PF_KICKSTARTACCEL)
&& (!K_PlayerUsesBotMovement(player))
&& (player->kickstartaccel >= ACCEL_KICKSTART));
}
UINT16 K_GetKartButtons(player_t *player)
UINT16 K_GetKartButtons(const player_t *player)
{
return (player->cmd.buttons |
(K_KartKickstart(player) ? BT_ACCELERATE : 0));
}
SINT8 K_GetForwardMove(player_t *player)
SINT8 K_GetForwardMove(const player_t *player)
{
SINT8 forwardmove = player->cmd.forwardmove;
@ -4300,7 +4300,7 @@ SINT8 K_GetForwardMove(player_t *player)
return forwardmove;
}
SINT8 K_GetSideMove(player_t *player)
SINT8 K_GetSideMove(const player_t *player)
{
SINT8 sidemove = player->cmd.sidemove;
@ -4320,7 +4320,7 @@ SINT8 K_GetSideMove(player_t *player)
return sidemove;
}
fixed_t K_GetNewSpeed(player_t *player)
fixed_t K_GetNewSpeed(const player_t *player)
{
const fixed_t accelmax = 4000;
const fixed_t p_speed = K_GetKartSpeed(player, true, true);
@ -4360,7 +4360,7 @@ fixed_t K_GetNewSpeed(player_t *player)
return finalspeed;
}
fixed_t K_3dKartMovement(player_t *player, boolean onground, SINT8 forwardmove)
fixed_t K_3dKartMovement(const player_t *player, boolean onground, SINT8 forwardmove)
{
fixed_t finalspeed = K_GetNewSpeed(player);
@ -4653,7 +4653,7 @@ INT32 K_ExplodePlayer(player_t *player, mobj_t *inflictor, mobj_t *source) // A
return ringburst;
}
boolean K_IsPlayerDamaged(player_t *player)
boolean K_IsPlayerDamaged(const player_t *player)
{
return ((player->spinouttimer > 0) || (player->flipovertimer > 0));
}
@ -9772,7 +9772,7 @@ static void K_UpdatePlayerWaypoints(player_t *const player)
player->pflags &= ~PF_TRUSTWAYPOINTS; // clear special exception
}
INT32 K_GetKartRingPower(player_t *player, boolean boosted)
INT32 K_GetKartRingPower(const player_t *player, boolean boosted)
{
fixed_t ringPower = ((9 - player->kartspeed) + (9 - player->kartweight)) * (FRACUNIT/2);
UINT16 finalPower = 0;
@ -9836,7 +9836,7 @@ boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y)
// countersteer is how strong the controls are telling us we are turning
// turndir is the direction the controls are telling us to turn, -1 if turning right and 1 if turning left
static INT16 K_GetKartDriftValue(player_t *player, fixed_t countersteer)
static INT16 K_GetKartDriftValue(const player_t *player, fixed_t countersteer)
{
INT16 basedrift, driftangle;
fixed_t driftweight = player->kartweight*14; // 12
@ -9863,7 +9863,7 @@ static INT16 K_GetKartDriftValue(player_t *player, fixed_t countersteer)
return basedrift + FixedMul(driftangle, countersteer);
}
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
INT16 K_GetKartTurnValue(const player_t *player, INT16 turnvalue)
{
fixed_t p_topspeed = K_GetKartSpeed(player, false, false);
fixed_t p_curspeed = min(player->speed, p_topspeed * 2);
@ -9909,7 +9909,7 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
return turnvalue;
}
INT32 K_GetKartDriftSparkValue(player_t *player)
INT32 K_GetKartDriftSparkValue(const player_t *player)
{
UINT8 kartspeed = ((gametyperules & GTR_KARMA) && player->bumper <= 0)
? 1
@ -9917,7 +9917,7 @@ INT32 K_GetKartDriftSparkValue(player_t *player)
return (26*4 + kartspeed*2 + (9 - player->kartweight))*8;
}
INT32 K_GetKartDriftSparkValueForStage(player_t *player, UINT8 stage)
INT32 K_GetKartDriftSparkValueForStage(const player_t *player, UINT8 stage)
{
fixed_t mul = FRACUNIT;
@ -10841,7 +10841,7 @@ void K_StripOther(player_t *player)
}
}
SINT8 K_Sliptiding(player_t *player)
SINT8 K_Sliptiding(const player_t *player)
{
return player->drift ? 0 : player->aizdriftstrat;
}
@ -10888,7 +10888,7 @@ static void K_AirFailsafe(player_t *player)
//
// K_PlayerBaseFriction
//
fixed_t K_PlayerBaseFriction(player_t *player, fixed_t original)
fixed_t K_PlayerBaseFriction(const player_t *player, fixed_t original)
{
const fixed_t factor = FixedMul(
FixedDiv(FRACUNIT - original, FRACUNIT - ORIG_FRICTION),
@ -11014,7 +11014,7 @@ void K_SetTireGrease(player_t *player, tic_t tics)
player->tiregrease = tics;
}
boolean K_SlopeResistance(player_t *player)
boolean K_SlopeResistance(const player_t *player)
{
if (player->tiregrease)
return true;

View file

@ -191,7 +191,7 @@ fixed_t K_GetKartGameSpeedScalar(SINT8 value);
extern consvar_t *KartItemCVars[NUMKARTRESULTS-1];
UINT8 K_FindUseodds(player_t *player, fixed_t mashed, UINT32 pdis, UINT8 bestbumper, boolean spbrush);
UINT8 K_FindUseodds(const player_t *player, fixed_t mashed, UINT32 pdis, UINT8 bestbumper, boolean spbrush);
INT32 K_FindLegacyUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT32 bestbumper, boolean spbrush, boolean dontforcespb);
fixed_t K_ItemOddsScale(UINT8 numPlayers, boolean spbrush);
UINT32 K_ScaleItemDistance(UINT32 distance, UINT8 numPlayers, boolean spbrush);
@ -227,7 +227,7 @@ void K_BattleAwardHit(player_t *player, player_t *victim, mobj_t *inflictor, UIN
void K_SpinPlayer(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 type);
void K_FlipPlayer(player_t *player, mobj_t *inflictor, mobj_t *source);
INT32 K_ExplodePlayer(player_t *player, mobj_t *inflictor, mobj_t *source);
boolean K_IsPlayerDamaged(player_t *player);
boolean K_IsPlayerDamaged(const player_t *player);
void K_HandleBumperChanges(player_t *player, UINT8 prevBumpers);
void K_DestroyBumpers(player_t *player, UINT8 amount);
void K_TakeBumpersFromPlayer(player_t *player, player_t *victim, UINT8 amount);
@ -263,13 +263,13 @@ void K_RemoveBubbleHealth(player_t *player, INT16 sub);
void K_RepairOrbitChain(mobj_t *orbit);
void K_CalculateBananaSlope(mobj_t *mobj, fixed_t x, fixed_t y, fixed_t z, fixed_t radius, fixed_t height, boolean flip, boolean player);
player_t *K_FindJawzTarget(mobj_t *actor, player_t *source);
INT32 K_GetKartRingPower(player_t *player, boolean boosted);
INT32 K_GetKartRingPower(const player_t *player, boolean boosted);
size_t K_NextRespawnWaypointIndex(waypoint_t *waypoint);
boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y);
void K_SetRespawnAtNextWaypoint(player_t * player);
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);
INT32 K_GetKartDriftSparkValue(player_t *player);
INT32 K_GetKartDriftSparkValueForStage(player_t *player, UINT8 stage);
INT16 K_GetKartTurnValue(const player_t *player, INT16 turnvalue);
INT32 K_GetKartDriftSparkValue(const player_t *player);
INT32 K_GetKartDriftSparkValueForStage(const player_t *player, UINT8 stage);
void K_SpawnDriftBoostExplosion(player_t *player, int stage);
void K_SpawnDriftElectricSparks(player_t *player);
INT32 K_GetDriftAngleOffset(player_t *player);
@ -284,31 +284,31 @@ void K_DropKitchenSink(player_t *player);
void K_StripItems(player_t *player);
void K_StripOther(player_t *player);
void K_MomentumToFacing(player_t *player);
boolean K_ApplyOffroad(player_t *player);
fixed_t K_PlayerTripwireSpeedThreshold(player_t *player);
tripwirepass_t K_TripwirePassConditions(player_t *player);
boolean K_TripwirePass(player_t *player);
boolean K_ApplyOffroad(const player_t *player);
fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player);
tripwirepass_t K_TripwirePassConditions(const player_t *player);
boolean K_TripwirePass(const player_t *player);
boolean K_WaterRun(mobj_t *mobj);
void K_SpawnWaterTrail(mobj_t *mobj);
boolean K_ItemMobjAllowedtoWaterRun(mobj_t *item);
void K_SetTireGrease(player_t *player, tic_t tics);
boolean K_SlopeResistance(player_t *player);
boolean K_SlopeResistance(const player_t *player);
void K_SquishPlayer(player_t *player, mobj_t *inflictor, mobj_t *source);
void K_ApplyTripWire(player_t *player, tripwirestate_t state);
fixed_t K_GetKartSpeedFromStat(UINT8 kartspeed, boolean karmabomb);
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower, boolean dorubberbanding);
fixed_t K_GetKartAccel(player_t *player);
UINT16 K_GetKartFlashing(player_t *player);
boolean K_PlayerShrinkCheat(player_t *player);
fixed_t K_GetKartSpeed(const player_t *player, boolean doboostpower, boolean dorubberbanding);
fixed_t K_GetKartAccel(const player_t *player);
UINT16 K_GetKartFlashing(const player_t *player);
boolean K_PlayerShrinkCheat(const player_t *player);
void K_UpdateShrinkCheat(player_t *player);
boolean K_KartKickstart(player_t *player);
UINT16 K_GetKartButtons(player_t *player);
SINT8 K_GetForwardMove(player_t *player);
SINT8 K_GetSideMove(player_t *player);
fixed_t K_GetNewSpeed(player_t *player);
fixed_t K_3dKartMovement(player_t *player, boolean onground, SINT8 fowardmove);
SINT8 K_Sliptiding(player_t *player);
fixed_t K_PlayerBaseFriction(player_t *player, fixed_t original);
boolean K_KartKickstart(const player_t *player);
UINT16 K_GetKartButtons(const player_t *player);
SINT8 K_GetForwardMove(const player_t *player);
SINT8 K_GetSideMove(const player_t *player);
fixed_t K_GetNewSpeed(const player_t *player);
fixed_t K_3dKartMovement(const player_t *player, boolean onground, SINT8 fowardmove);
SINT8 K_Sliptiding(const player_t *player);
fixed_t K_PlayerBaseFriction(const player_t *player, fixed_t original);
void K_MoveKartPlayer(player_t *player, boolean onground);
void K_CheckSpectateStatus(boolean considermapreset);
UINT8 K_GetInvincibilityItemFrame(void);

View file

@ -174,13 +174,13 @@ void P_CalcChasePostImg(player_t *player, camera_t *thiscam);
boolean P_CanPlayerTurn(player_t *player, ticcmd_t *cmd);
boolean P_PlayerInPain(player_t *player);
boolean P_PlayerInPain(const player_t *player);
void P_ResetPlayer(player_t *player);
boolean P_PlayerCanDamage(player_t *player, mobj_t *thing);
fixed_t P_GetPlayerHeight(player_t *player);
fixed_t P_GetPlayerSpinHeight(player_t *player);
boolean P_IsLocalPlayer(player_t *player);
boolean P_IsLocalPlayer(const player_t *player);
boolean P_IsMachineLocalPlayer(player_t *player);
boolean P_IsDisplayPlayer(player_t *player);
@ -189,12 +189,12 @@ angle_t P_GetLocalAngle(player_t *player);
void P_ForceLocalAngle(player_t *player, angle_t angle, boolean interp);
boolean P_PlayerFullbright(player_t *player);
boolean P_IsObjectInGoop(mobj_t *mo);
boolean P_IsObjectOnGround(mobj_t *mo);
boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec);
boolean P_IsObjectOnRealGround(mobj_t *mo, sector_t *sec); // SRB2Kart
boolean P_IsObjectInGoop(const mobj_t *mo);
boolean P_IsObjectOnGround(const mobj_t *mo);
boolean P_IsObjectOnGroundIn(const mobj_t *mo, const sector_t *sec);
boolean P_IsObjectOnRealGround(const mobj_t *mo, const sector_t *sec); // SRB2Kart
#define P_IsObjectFlipped(o) (((o)->eflags & MFE_VERTICALFLIP) == MFE_VERTICALFLIP)
boolean P_InQuicksand(mobj_t *mo);
boolean P_InQuicksand(const mobj_t *mo);
boolean P_PlayerHitFloor(player_t *player, boolean fromAir);
void P_SetObjectMomZ(mobj_t *mo, fixed_t value, boolean relative);
@ -328,13 +328,13 @@ void P_SceneryThinker(mobj_t *mobj);
// This does not need to be added to Lua.
// To test it in Lua, check mobj.valid
FUNCINLINE static ATTRINLINE boolean P_MobjWasRemoved(mobj_t *mobj)
FUNCINLINE static ATTRINLINE boolean P_MobjWasRemoved(const mobj_t *mobj)
{
return mobj == NULL || mobj->thinker.function.acp1 != (actionf_p1)P_MobjThinker;
}
fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect);
fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect);
fixed_t P_MobjFloorZ(const mobj_t *mobj, const sector_t *sector, const sector_t *boundsec, fixed_t x, fixed_t y, const line_t *line, boolean lowest, boolean perfect);
fixed_t P_MobjCeilingZ(const mobj_t *mobj, const sector_t *sector, const sector_t *boundsec, fixed_t x, fixed_t y, const line_t *line, boolean lowest, boolean perfect);
#define P_GetFloorZ(mobj, sector, x, y, line) P_MobjFloorZ(mobj, sector, NULL, x, y, line, false, false)
#define P_GetCeilingZ(mobj, sector, x, y, line) P_MobjCeilingZ(mobj, sector, NULL, x, y, line, true, false)
#define P_GetFOFTopZ(mobj, sector, fof, x, y, line) P_MobjCeilingZ(mobj, sectors + fof->secnum, sector, x, y, line, false, false)

View file

@ -635,7 +635,7 @@ boolean P_InsideANonSolidFFloor(mobj_t *mobj, ffloor_t *rover)
// Supply boundsec ONLY when checking for specials! It should be the "in-level" sector, and sector the control sector (if separate).
// If set, then this function will iterate through boundsec's linedefs to find the highest contact point on the slope. Non-special-checking
// usage will handle that later.
static fixed_t HighestOnLine(fixed_t radius, fixed_t x, fixed_t y, line_t *line, pslope_t *slope, boolean actuallylowest)
static fixed_t HighestOnLine(fixed_t radius, fixed_t x, fixed_t y, const line_t *line, const pslope_t *slope, boolean actuallylowest)
{
// Alright, so we're sitting on a line that contains our slope sector, and need to figure out the highest point we're touching...
// The solution is simple! Get the line's vertices, and pull each one in along its line until it touches the object's bounding box
@ -733,7 +733,7 @@ static fixed_t HighestOnLine(fixed_t radius, fixed_t x, fixed_t y, line_t *line,
);
}
fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect)
fixed_t P_MobjFloorZ(const mobj_t *mobj, const sector_t *sector, const sector_t *boundsec, fixed_t x, fixed_t y, const line_t *line, boolean lowest, boolean perfect)
{
I_Assert(mobj != NULL);
I_Assert(sector != NULL);
@ -810,7 +810,7 @@ fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t
return sector->floorheight;
}
fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect)
fixed_t P_MobjCeilingZ(const mobj_t *mobj, const sector_t *sector, const sector_t *boundsec, fixed_t x, fixed_t y, const line_t *line, boolean lowest, boolean perfect)
{
I_Assert(mobj != NULL);
I_Assert(sector != NULL);

View file

@ -465,7 +465,7 @@ UINT8 P_FindHighestLap(void)
// Is player in pain??
// Checks for painstate and flashing, if both found return true
//
boolean P_PlayerInPain(player_t *player)
boolean P_PlayerInPain(const player_t *player)
{
if (K_IsPlayerDamaged(player) || player->squishedtimer)
return true;
@ -890,7 +890,7 @@ void P_RestoreMusic(player_t *player)
// Returns true if the object is inside goop water.
// (Spectators and objects otherwise without gravity cannot have goop gravity!)
//
boolean P_IsObjectInGoop(mobj_t *mo)
boolean P_IsObjectInGoop(const mobj_t *mo)
{
if (mo->player && mo->player->spectator)
return false;
@ -908,7 +908,7 @@ boolean P_IsObjectInGoop(mobj_t *mo)
// on the ground. Takes reverse
// gravity and FOFs into account.
//
boolean P_IsObjectOnGround(mobj_t *mo)
boolean P_IsObjectOnGround(const mobj_t *mo)
{
if (P_IsObjectInGoop(mo))
{
@ -953,7 +953,7 @@ boolean P_IsObjectOnGround(mobj_t *mo)
// on the ground in a specific sector. Takes reverse
// gravity and FOFs into account.
//
boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec)
boolean P_IsObjectOnGroundIn(const mobj_t *mo, const sector_t *sec)
{
ffloor_t *rover;
@ -1040,7 +1040,7 @@ boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec)
// Really simple, but personally I think it's also incredibly helpful. I think this is fine in p_user.c
// -- Sal
boolean P_IsObjectOnRealGround(mobj_t *mo, sector_t *sec)
boolean P_IsObjectOnRealGround(const mobj_t *mo, const sector_t *sec)
{
// Is the object in reverse gravity?
if (mo->eflags & MFE_VERTICALFLIP)
@ -1132,7 +1132,7 @@ boolean P_IsMachineLocalPlayer(player_t *player)
// on the local machine
// (or simulated party)
//
boolean P_IsLocalPlayer(player_t *player)
boolean P_IsLocalPlayer(const player_t *player)
{
if (player == NULL)
{
@ -1400,7 +1400,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean fromAir)
return clipmomz;
}
boolean P_InQuicksand(mobj_t *mo) // Returns true if you are in quicksand
boolean P_InQuicksand(const mobj_t *mo) // Returns true if you are in quicksand
{
sector_t *sector = mo->subsector->sector;
fixed_t topheight, bottomheight;