mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Merge branch 'emeraldfixes' into 'master'
Special stage related fixes See merge request STJr/SRB2Internal!269
This commit is contained in:
commit
7af04015a2
6 changed files with 46 additions and 14 deletions
|
|
@ -4366,7 +4366,7 @@ void G_WriteGhostTic(mobj_t *ghost)
|
||||||
ghostext.flags = 0;
|
ghostext.flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ghost->player && ghost->player->followmobj)
|
if (ghost->player && ghost->player->followmobj) // bloats tails runs but what can ya do
|
||||||
{
|
{
|
||||||
INT16 temp;
|
INT16 temp;
|
||||||
|
|
||||||
|
|
@ -4592,6 +4592,9 @@ void G_GhostTicker(void)
|
||||||
switch(g->color)
|
switch(g->color)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
case GHC_RETURNSKIN:
|
||||||
|
g->mo->skin = g->oldmo.skin;
|
||||||
|
// fallthru
|
||||||
case GHC_NORMAL: // Go back to skin color
|
case GHC_NORMAL: // Go back to skin color
|
||||||
g->mo->color = g->oldmo.color;
|
g->mo->color = g->oldmo.color;
|
||||||
break;
|
break;
|
||||||
|
|
@ -4602,6 +4605,9 @@ void G_GhostTicker(void)
|
||||||
case GHC_FIREFLOWER: // Fireflower
|
case GHC_FIREFLOWER: // Fireflower
|
||||||
g->mo->color = SKINCOLOR_WHITE;
|
g->mo->color = SKINCOLOR_WHITE;
|
||||||
break;
|
break;
|
||||||
|
case GHC_NIGHTSSKIN: // not actually a colour
|
||||||
|
g->mo->skin = &skins[DEFAULTNIGHTSSKIN];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (xziptic & EZT_FLIP)
|
if (xziptic & EZT_FLIP)
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,9 @@ typedef enum
|
||||||
GHC_NORMAL = 0,
|
GHC_NORMAL = 0,
|
||||||
GHC_SUPER,
|
GHC_SUPER,
|
||||||
GHC_FIREFLOWER,
|
GHC_FIREFLOWER,
|
||||||
GHC_INVINCIBLE
|
GHC_INVINCIBLE,
|
||||||
|
GHC_NIGHTSSKIN, // not actually a colour
|
||||||
|
GHC_RETURNSKIN // ditto
|
||||||
} ghostcolor_t;
|
} ghostcolor_t;
|
||||||
|
|
||||||
// Record/playback tics
|
// Record/playback tics
|
||||||
|
|
|
||||||
|
|
@ -670,7 +670,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_DoMatchSuper(player);
|
P_DoMatchSuper(player);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
emeralds |= special->info->speed;
|
emeralds |= special->info->speed;
|
||||||
|
stagefailed = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (special->target && special->target->type == MT_EMERALDSPAWN)
|
if (special->target && special->target->type == MT_EMERALDSPAWN)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2205,7 +2205,7 @@ static void P_LevelInitStuff(void)
|
||||||
ssspheres = timeinmap = 0;
|
ssspheres = timeinmap = 0;
|
||||||
|
|
||||||
// special stage
|
// special stage
|
||||||
stagefailed = false;
|
stagefailed = true; // assume failed unless proven otherwise - P_GiveEmerald or emerald touchspecial
|
||||||
// Reset temporary record data
|
// Reset temporary record data
|
||||||
memset(&ntemprecords, 0, sizeof(nightsdata_t));
|
memset(&ntemprecords, 0, sizeof(nightsdata_t));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -518,10 +518,7 @@ static inline void P_DoSpecialStageStuff(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
sstimer = 0;
|
sstimer = 0;
|
||||||
stagefailed = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
40
src/p_user.c
40
src/p_user.c
|
|
@ -302,15 +302,39 @@ void P_GiveEmerald(boolean spawnObj)
|
||||||
|
|
||||||
S_StartSound(NULL, sfx_cgot); // Got the emerald!
|
S_StartSound(NULL, sfx_cgot); // Got the emerald!
|
||||||
emeralds |= (1 << em);
|
emeralds |= (1 << em);
|
||||||
|
stagefailed = false;
|
||||||
|
|
||||||
if (spawnObj && playeringame[consoleplayer])
|
if (spawnObj)
|
||||||
{
|
{
|
||||||
// The Chaos Emerald begins to orbit us!
|
// The Chaos Emerald begins to orbit us!
|
||||||
// Only give it to ONE person!
|
// Only visibly give it to ONE person!
|
||||||
mobj_t *emmo = P_SpawnMobjFromMobj(players[consoleplayer].mo, 0, 0, players[consoleplayer].mo->height, MT_GOTEMERALD);
|
UINT8 i, pnum = ((playeringame[consoleplayer]) && (!players[consoleplayer].spectator) && (players[consoleplayer].mo)) ? consoleplayer : 255;
|
||||||
P_SetTarget(&emmo->target, players[consoleplayer].mo);
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
|
{
|
||||||
P_SetTarget(&players[consoleplayer].mo->tracer, emmo);
|
mobj_t *emmo;
|
||||||
|
if (!playeringame[i])
|
||||||
|
continue;
|
||||||
|
if (players[i].spectator)
|
||||||
|
continue;
|
||||||
|
if (!players[i].mo)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
emmo = P_SpawnMobjFromMobj(players[i].mo, 0, 0, players[i].mo->height, MT_GOTEMERALD);
|
||||||
|
P_SetTarget(&emmo->target, players[i].mo);
|
||||||
|
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
|
||||||
|
P_SetTarget(&players[i].mo->tracer, emmo);
|
||||||
|
|
||||||
|
if (pnum == 255)
|
||||||
|
{
|
||||||
|
i = pnum;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i == pnum)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
emmo->flags2 |= MF2_DONTDRAW;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -597,7 +621,7 @@ static void P_DeNightserizePlayer(player_t *player)
|
||||||
player->mo->skin = &skins[player->skin];
|
player->mo->skin = &skins[player->skin];
|
||||||
player->followitem = skins[player->skin].followitem;
|
player->followitem = skins[player->skin].followitem;
|
||||||
player->mo->color = player->skincolor;
|
player->mo->color = player->skincolor;
|
||||||
G_GhostAddColor(GHC_NORMAL);
|
G_GhostAddColor(GHC_RETURNSKIN);
|
||||||
|
|
||||||
// Restore aiming angle
|
// Restore aiming angle
|
||||||
if (player == &players[consoleplayer])
|
if (player == &players[consoleplayer])
|
||||||
|
|
@ -615,7 +639,6 @@ static void P_DeNightserizePlayer(player_t *player)
|
||||||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||||
players[i].nightstime = 1; // force everyone else to fall too.
|
players[i].nightstime = 1; // force everyone else to fall too.
|
||||||
player->exiting = 3*TICRATE;
|
player->exiting = 3*TICRATE;
|
||||||
stagefailed = true; // NIGHT OVER
|
|
||||||
|
|
||||||
// If you screwed up, kiss your score and ring bonus goodbye.
|
// If you screwed up, kiss your score and ring bonus goodbye.
|
||||||
// But only do this in special stage (and instakill!) In regular stages, wait til we hit the ground.
|
// But only do this in special stage (and instakill!) In regular stages, wait til we hit the ground.
|
||||||
|
|
@ -716,6 +739,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
||||||
if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback))
|
if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback))
|
||||||
player->mo->color = skins[DEFAULTNIGHTSSKIN].prefcolor;
|
player->mo->color = skins[DEFAULTNIGHTSSKIN].prefcolor;
|
||||||
player->followitem = skins[DEFAULTNIGHTSSKIN].followitem;
|
player->followitem = skins[DEFAULTNIGHTSSKIN].followitem;
|
||||||
|
G_GhostAddColor(GHC_NIGHTSSKIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->nightstime = player->startedtime = player->lapstartedtime = nighttime*TICRATE;
|
player->nightstime = player->startedtime = player->lapstartedtime = nighttime*TICRATE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue