mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-28 08:21:31 +00:00
Merge branch 'podium-bugsquoosh' into 'master'
Podium BugSquoosh See merge request KartKrew/Kart!1258
This commit is contained in:
commit
ff23501e74
5 changed files with 51 additions and 7 deletions
|
|
@ -17,6 +17,7 @@
|
|||
#include "g_game.h"
|
||||
#include "k_bot.h"
|
||||
#include "k_kart.h"
|
||||
#include "k_podium.h"
|
||||
#include "m_random.h"
|
||||
#include "p_local.h"
|
||||
#include "r_things.h"
|
||||
|
|
@ -326,6 +327,9 @@ void K_UpdateGrandPrixBots(void)
|
|||
UINT16 newrivalscore = 0;
|
||||
UINT8 i;
|
||||
|
||||
if (K_PodiumSequence())
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || !players[i].bot)
|
||||
|
|
|
|||
|
|
@ -258,9 +258,13 @@ boolean K_StartCeremony(void)
|
|||
// and be present for the podium
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && !players[i].spectator && !players[i].bot)
|
||||
if (playeringame[i])
|
||||
{
|
||||
players[i].lives = max(1, players[i].lives);
|
||||
if (players[i].lives < 1)
|
||||
players[i].lives = 1;
|
||||
|
||||
if (players[i].bot)
|
||||
players[i].spectator = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -360,8 +360,8 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData)
|
|||
|
||||
const INT32 positionWeight = 150;
|
||||
const INT32 pointsWeight = 100;
|
||||
const INT32 lapsWeight = 100;
|
||||
const INT32 prisonsWeight = 100;
|
||||
const INT32 lapsWeight = (rankData->totalLaps > 0) ? 100 : 0;
|
||||
const INT32 prisonsWeight = (rankData->totalPrisons > 0) ? 100 : 0;
|
||||
const INT32 ringsWeight = 50;
|
||||
const INT32 total = positionWeight + pointsWeight + lapsWeight + prisonsWeight + ringsWeight;
|
||||
const INT32 continuesPenalty = 20;
|
||||
|
|
|
|||
|
|
@ -9483,6 +9483,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
}
|
||||
|
||||
// If target is valid, then we'll focus on it.
|
||||
// See also linedef type 422
|
||||
if (mobj->target != NULL && P_MobjWasRemoved(mobj->target) == false)
|
||||
{
|
||||
mobj->angle = R_PointToAngle2(
|
||||
|
|
@ -11665,8 +11666,11 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
}
|
||||
else if (p->bot)
|
||||
{
|
||||
if (K_PodiumSequence() == false
|
||||
&& (!(gametyperules & GTR_BOTS) || (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE)))
|
||||
if (K_PodiumSequence() == true)
|
||||
; // This is too late to correct spectator status. Whatever state we're in at this point, our (dog) bed is made.
|
||||
else if (!(gametyperules & GTR_BOTS)
|
||||
|| (grandprixinfo.gp == true
|
||||
&& grandprixinfo.eventmode != GPEVENT_NONE))
|
||||
{
|
||||
// Bots aren't supposed to be here.
|
||||
p->spectator = true;
|
||||
|
|
|
|||
34
src/p_spec.c
34
src/p_spec.c
|
|
@ -3026,6 +3026,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
{
|
||||
altview_t *modifyView = NULL;
|
||||
mobj_t *newViewMobj = NULL;
|
||||
INT32 i;
|
||||
|
||||
if (gamestate != GS_LEVEL)
|
||||
{
|
||||
|
|
@ -3052,10 +3053,20 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
{
|
||||
// If titlemap, awayview.tics is ignored
|
||||
modifyView->tics = -1;
|
||||
|
||||
R_ResetViewInterpolation(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
modifyView->tics = args[1];
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (displayplayers[i] == (mo->player - players))
|
||||
{
|
||||
R_ResetViewInterpolation(i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (args[2] != 0)
|
||||
|
|
@ -3067,7 +3078,6 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
case TMCAM_THIRD:
|
||||
{
|
||||
mobj_t *firstPlace = NULL;
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
@ -3125,6 +3135,28 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If target is valid, then we'll focus on it.
|
||||
// See also MT_ALTVIEWMAN mobjthinker
|
||||
if (newViewMobj->target != NULL && P_MobjWasRemoved(newViewMobj->target) == false)
|
||||
{
|
||||
newViewMobj->angle = R_PointToAngle2(
|
||||
newViewMobj->x,
|
||||
newViewMobj->y,
|
||||
newViewMobj->target->x,
|
||||
newViewMobj->target->y
|
||||
);
|
||||
|
||||
newViewMobj->pitch = R_PointToAngle2(
|
||||
0,
|
||||
newViewMobj->z,
|
||||
R_PointToDist2(
|
||||
newViewMobj->x, newViewMobj->y,
|
||||
newViewMobj->target->x, newViewMobj->target->y
|
||||
),
|
||||
newViewMobj->target->z + (newViewMobj->target->height >> 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue