mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add Duel objects
- Banana, Eggman Items, Proxi Mine, Land Mine, Hyudoro, and Drop Targets are now placeable in maps. - By default, will only appear when in 1v1s. (Extra flag can be checked to enable spawning in all modes.) - Most of these objects will need tweaks to account for being placeable now.
This commit is contained in:
parent
5d8df43b10
commit
d7be3d3aca
7 changed files with 82 additions and 7 deletions
|
|
@ -139,7 +139,7 @@ skins
|
||||||
// Gametypes
|
// Gametypes
|
||||||
gametypes
|
gametypes
|
||||||
{
|
{
|
||||||
-1 = "Single Player";
|
-1 = "Grand Prix";
|
||||||
0 = "Race";
|
0 = "Race";
|
||||||
1 = "Battle";
|
1 = "Battle";
|
||||||
}
|
}
|
||||||
|
|
@ -5113,6 +5113,7 @@ thingtypes
|
||||||
height = 92;
|
height = 92;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
waypoints
|
waypoints
|
||||||
{
|
{
|
||||||
color = 4; // Red
|
color = 4; // Red
|
||||||
|
|
@ -5161,6 +5162,58 @@ thingtypes
|
||||||
fixedrotation = 1;
|
fixedrotation = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
duel
|
||||||
|
{
|
||||||
|
color = 4; // Red
|
||||||
|
arrow = 1;
|
||||||
|
title = "Duel-Only";
|
||||||
|
sprite = "SPBMA2A8";
|
||||||
|
width = 16;
|
||||||
|
height = 32;
|
||||||
|
flags1text = "[1] Spawn in all modes";
|
||||||
|
|
||||||
|
2050
|
||||||
|
{
|
||||||
|
title = "Duel Bomb";
|
||||||
|
}
|
||||||
|
|
||||||
|
2051
|
||||||
|
{
|
||||||
|
title = "Banana";
|
||||||
|
sprite = "BANAA2A8";
|
||||||
|
}
|
||||||
|
|
||||||
|
2052
|
||||||
|
{
|
||||||
|
title = "Eggman Item";
|
||||||
|
sprite = "FITMA0";
|
||||||
|
}
|
||||||
|
|
||||||
|
2053
|
||||||
|
{
|
||||||
|
title = "Proximity Mine";
|
||||||
|
sprite = "SSMNA0";
|
||||||
|
}
|
||||||
|
|
||||||
|
2054
|
||||||
|
{
|
||||||
|
title = "Land Mine";
|
||||||
|
sprite = "LNDMA0";
|
||||||
|
}
|
||||||
|
|
||||||
|
2055
|
||||||
|
{
|
||||||
|
title = "Hyudoro";
|
||||||
|
sprite = "HYUUA2A8";
|
||||||
|
}
|
||||||
|
|
||||||
|
2056
|
||||||
|
{
|
||||||
|
title = "Drop Target";
|
||||||
|
sprite = "DTRGA0";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Default things filters
|
//Default things filters
|
||||||
|
|
|
||||||
|
|
@ -669,6 +669,7 @@ extern boolean thwompsactive;
|
||||||
extern UINT8 lastLowestLap;
|
extern UINT8 lastLowestLap;
|
||||||
extern SINT8 spbplace;
|
extern SINT8 spbplace;
|
||||||
extern boolean rainbowstartavailable;
|
extern boolean rainbowstartavailable;
|
||||||
|
extern boolean inDuel;
|
||||||
|
|
||||||
extern tic_t bombflashtimer; // Used to avoid causing seizures if multiple mines explode close to you :)
|
extern tic_t bombflashtimer; // Used to avoid causing seizures if multiple mines explode close to you :)
|
||||||
extern boolean legitimateexit;
|
extern boolean legitimateexit;
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,7 @@ boolean thwompsactive; // Thwomps activate on lap 2
|
||||||
UINT8 lastLowestLap; // Last lowest lap, for activating race lap executors
|
UINT8 lastLowestLap; // Last lowest lap, for activating race lap executors
|
||||||
SINT8 spbplace; // SPB exists, give the person behind better items
|
SINT8 spbplace; // SPB exists, give the person behind better items
|
||||||
boolean rainbowstartavailable; // Boolean, keeps track of if the rainbow start was gotten
|
boolean rainbowstartavailable; // Boolean, keeps track of if the rainbow start was gotten
|
||||||
|
boolean inDuel; // Boolean, keeps track of if it is a 1v1
|
||||||
|
|
||||||
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
|
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
|
||||||
tic_t bombflashtimer = 0; // Cooldown before another FlashPal can be intialized by a bomb exploding near a displayplayer. Avoids seizures.
|
tic_t bombflashtimer = 0; // Cooldown before another FlashPal can be intialized by a bomb exploding near a displayplayer. Avoids seizures.
|
||||||
|
|
|
||||||
12
src/info.c
12
src/info.c
|
|
@ -23310,7 +23310,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_EGGMANITEM
|
{ // MT_EGGMANITEM
|
||||||
-1, // doomednum
|
2052, // doomednum
|
||||||
S_EGGMANITEM1, // spawnstate
|
S_EGGMANITEM1, // spawnstate
|
||||||
2, // spawnhealth
|
2, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
|
|
@ -23364,7 +23364,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_BANANA
|
{ // MT_BANANA
|
||||||
-1, // doomednum
|
2051, // doomednum
|
||||||
S_BANANA, // spawnstate
|
S_BANANA, // spawnstate
|
||||||
2, // spawnhealth
|
2, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
|
|
@ -23553,7 +23553,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_SSMINE
|
{ // MT_SSMINE
|
||||||
-1, // doomednum
|
2053, // doomednum
|
||||||
S_SSMINE_AIR1, // spawnstate
|
S_SSMINE_AIR1, // spawnstate
|
||||||
1, // spawnhealth
|
1, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
|
|
@ -23688,7 +23688,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_LANDMINE
|
{ // MT_LANDMINE
|
||||||
-1, // doomednum
|
2054, // doomednum
|
||||||
S_LANDMINE, // spawnstate
|
S_LANDMINE, // spawnstate
|
||||||
2, // spawnhealth
|
2, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
|
|
@ -23715,7 +23715,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_DROPTARGET
|
{ // MT_DROPTARGET
|
||||||
-1, // doomednum
|
2056, // doomednum
|
||||||
S_DROPTARGET, // spawnstate
|
S_DROPTARGET, // spawnstate
|
||||||
3, // spawnhealth
|
3, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
|
|
@ -24066,7 +24066,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_HYUDORO
|
{ // MT_HYUDORO
|
||||||
-1, // doomednum
|
2055, // doomednum
|
||||||
S_HYUDORO, // spawnstate
|
S_HYUDORO, // spawnstate
|
||||||
1000, // spawnhealth
|
1000, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,9 @@ void K_TimerInit(void)
|
||||||
numPlayers++;
|
numPlayers++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1v1 activates DUEL rules!
|
||||||
|
inDuel = (numPlayers == 2);
|
||||||
|
|
||||||
if (numPlayers >= 2)
|
if (numPlayers >= 2)
|
||||||
{
|
{
|
||||||
rainbowstartavailable = true;
|
rainbowstartavailable = true;
|
||||||
|
|
|
||||||
15
src/p_mobj.c
15
src/p_mobj.c
|
|
@ -11548,6 +11548,21 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
//case MT_DUELBOMB:
|
||||||
|
case MT_BANANA:
|
||||||
|
case MT_EGGMANITEM:
|
||||||
|
case MT_SSMINE:
|
||||||
|
case MT_LANDMINE:
|
||||||
|
case MT_HYUDORO:
|
||||||
|
case MT_DROPTARGET:
|
||||||
|
{
|
||||||
|
// Duel objects.
|
||||||
|
// Normally only spawn when placed by the map in Duels,
|
||||||
|
// but can be forced to always spawn with the Extra flag.
|
||||||
|
if (inDuel == false && !(mthing->options & MTF_EXTRA))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4576,6 +4576,7 @@ static void P_NetArchiveMisc(boolean resending)
|
||||||
WRITEUINT8(save_p, lastLowestLap);
|
WRITEUINT8(save_p, lastLowestLap);
|
||||||
WRITESINT8(save_p, spbplace);
|
WRITESINT8(save_p, spbplace);
|
||||||
WRITEUINT8(save_p, rainbowstartavailable);
|
WRITEUINT8(save_p, rainbowstartavailable);
|
||||||
|
WRITEUINT8(save_p, inDuel);
|
||||||
|
|
||||||
WRITEUINT32(save_p, introtime);
|
WRITEUINT32(save_p, introtime);
|
||||||
WRITEUINT32(save_p, starttime);
|
WRITEUINT32(save_p, starttime);
|
||||||
|
|
@ -4733,6 +4734,7 @@ static inline boolean P_NetUnArchiveMisc(boolean reloading)
|
||||||
lastLowestLap = READUINT8(save_p);
|
lastLowestLap = READUINT8(save_p);
|
||||||
spbplace = READSINT8(save_p);
|
spbplace = READSINT8(save_p);
|
||||||
rainbowstartavailable = (boolean)READUINT8(save_p);
|
rainbowstartavailable = (boolean)READUINT8(save_p);
|
||||||
|
inDuel = (boolean)READUINT8(save_p);
|
||||||
|
|
||||||
introtime = READUINT32(save_p);
|
introtime = READUINT32(save_p);
|
||||||
starttime = READUINT32(save_p);
|
starttime = READUINT32(save_p);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue