mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
SPB Attack: emblems/medals preliminary
This commit is contained in:
parent
79d8e4e109
commit
6173ca47aa
7 changed files with 24 additions and 7 deletions
|
|
@ -6402,6 +6402,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
|
||||
// Map emblem var flags
|
||||
{"ME_ENCORE",ME_ENCORE},
|
||||
{"ME_SPBATTACK",ME_SPBATTACK},
|
||||
|
||||
// p_local.h constants
|
||||
{"FLOATSPEED",FLOATSPEED},
|
||||
|
|
|
|||
|
|
@ -121,11 +121,12 @@ struct recorddata_t
|
|||
};
|
||||
|
||||
// mapvisited is now a set of flags that says what we've done in the map.
|
||||
#define MV_VISITED (1)
|
||||
#define MV_BEATEN (1<<1)
|
||||
#define MV_ENCORE (1<<2)
|
||||
#define MV_MAX (MV_VISITED|MV_BEATEN|MV_ENCORE)
|
||||
#define MV_MP ((MV_MAX+1)<<1)
|
||||
#define MV_VISITED (1)
|
||||
#define MV_BEATEN (1<<1)
|
||||
#define MV_ENCORE (1<<2)
|
||||
#define MV_SPBATTACK (1<<3)
|
||||
#define MV_MAX (MV_VISITED|MV_BEATEN|MV_ENCORE)
|
||||
#define MV_MP ((MV_MAX+1)<<1)
|
||||
|
||||
// Set if homebrew PWAD stuff has been added.
|
||||
extern boolean modifiedgame;
|
||||
|
|
|
|||
11
src/g_game.c
11
src/g_game.c
|
|
@ -512,6 +512,12 @@ void G_UpdateTimeStickerMedals(UINT16 map, boolean showownrecord)
|
|||
{
|
||||
break;
|
||||
}
|
||||
case ET_MAP:
|
||||
{
|
||||
if (emblem->flags & ME_SPBATTACK)
|
||||
break;
|
||||
goto bademblem;
|
||||
}
|
||||
default:
|
||||
goto bademblem;
|
||||
}
|
||||
|
|
@ -3697,6 +3703,11 @@ static void G_UpdateVisited(void)
|
|||
mapheaderinfo[prevmap]->mapvisited |= MV_ENCORE;
|
||||
}
|
||||
|
||||
if (modeattacking & ATTACKING_SPB)
|
||||
{
|
||||
mapheaderinfo[prevmap]->mapvisited |= MV_SPBATTACK;
|
||||
}
|
||||
|
||||
if (modeattacking)
|
||||
G_UpdateRecordReplays();
|
||||
|
||||
|
|
|
|||
|
|
@ -1029,6 +1029,9 @@ UINT8 M_CompletionEmblems(void) // Bah! Duplication sucks, but it's for a separa
|
|||
if (embtype & ME_ENCORE)
|
||||
flags |= MV_ENCORE;
|
||||
|
||||
if (embtype & ME_SPBATTACK)
|
||||
flags |= MV_SPBATTACK;
|
||||
|
||||
res = ((mapheaderinfo[levelnum]->mapvisited & flags) == flags);
|
||||
|
||||
gamedata->collected[i] = res;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ struct conditionset_t
|
|||
|
||||
// Map emblem flags
|
||||
#define ME_ENCORE 1 // Achieve in Encore
|
||||
#define ME_SPBATTACK 2 // Achieve in SPB Attack
|
||||
|
||||
struct emblem_t
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12175,7 +12175,7 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
|
|||
boolean isRingCapsule = (mthing->args[0] < 1 || mthing->args[0] == KITEM_SUPERRING || mthing->args[0] >= NUMKARTITEMS);
|
||||
|
||||
// don't spawn ring capsules in GTR_SPHERES gametypes
|
||||
if (isRingCapsule && (gametyperules & GTR_SPHERES))
|
||||
if (isRingCapsule && ((gametyperules & GTR_SPHERES) || (modeattacking & ATTACKING_SPB)))
|
||||
return false;
|
||||
|
||||
// in record attack, only spawn ring capsules
|
||||
|
|
|
|||
|
|
@ -1973,7 +1973,7 @@ static void K_HandleLapIncrement(player_t *player)
|
|||
rainbowstartavailable = false;
|
||||
}
|
||||
|
||||
if (player->laps == 1 && modeattacking & ATTACKING_SPB)
|
||||
if (player->laps == 1 && modeattacking & ATTACKING_SPB && false)
|
||||
{
|
||||
P_SpawnMobj(player->mo->x - FixedMul(8000*mapobjectscale, cos(player->mo->angle)),
|
||||
player->mo->y - FixedMul(8000*mapobjectscale, sin(player->mo->angle)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue