mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-24 14:31:02 +00:00
Seasaw defs, variables + new function to sanitize checks for my hardcoded mess
This commit is contained in:
parent
fddc15f11f
commit
058a1c03b5
12 changed files with 218 additions and 6 deletions
|
|
@ -758,6 +758,11 @@ struct player_t
|
|||
INT32 seasawmoreangle; // used for reverse sesaws in DLZ.
|
||||
boolean seasawdir; // flips or not seasaw rotation
|
||||
|
||||
// water palace turbines (or cnz barrels, or whatever the hell people use it for nowadays)
|
||||
tic_t turbine; // ticker (while true, we set the tracer to the turbine)
|
||||
INT32 turbineangle; // angle around the turbine. ...Made in INT32 to make it easier to translate from lua
|
||||
fixed_t turbineheight; // height around the turbine
|
||||
boolean turbinespd; // if true, we used a sneaker and get the altpath.
|
||||
|
||||
//
|
||||
|
||||
|
|
|
|||
|
|
@ -4678,6 +4678,12 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
|||
"S_DLZHOVER",
|
||||
"S_DLZROCKET_L",
|
||||
"S_DLZROCKET_R",
|
||||
|
||||
"S_WPZFOUNTAIN",
|
||||
"S_WPZFOUNTAINANIM",
|
||||
"S_KURAGEN",
|
||||
"S_KURAGENBOMB",
|
||||
|
||||
};
|
||||
|
||||
// RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1",
|
||||
|
|
@ -5845,6 +5851,12 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
"MT_DLZ_SEASAW_VISUAL",
|
||||
"MT_DLZ_RINGVACCUM",
|
||||
"MT_DLZ_SUCKEDRING",
|
||||
|
||||
"MT_WATERPALACETURBINE",
|
||||
"MT_WATERPALACEBUBBLE",
|
||||
"MT_WATERPALACEFOUNTAIN",
|
||||
"MT_KURAGEN",
|
||||
"MT_KURAGENBOMB",
|
||||
};
|
||||
|
||||
const char *const MOBJFLAG_LIST[] = {
|
||||
|
|
|
|||
147
src/info.c
147
src/info.c
|
|
@ -907,6 +907,11 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"DLZS",
|
||||
"DLZA",
|
||||
|
||||
// Water Palace Zone
|
||||
"WPWL", // turbine
|
||||
"WPZF", // fountain
|
||||
"WPZK", // klagen
|
||||
|
||||
// First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later
|
||||
"VIEW",
|
||||
};
|
||||
|
|
@ -5433,14 +5438,21 @@ state_t states[NUMSTATES] =
|
|||
{SPR_SGNS, FF_ADD|FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_CHECKPOINT_SPARK11}, // S_CHECKPOINT_SPARK10
|
||||
{SPR_SGNS, FF_ADD|FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_CHECKPOINT_SPARK1}, // S_CHECKPOINT_SPARK11
|
||||
|
||||
// Las Vegas
|
||||
{SPR_RDRD, 0, -1, {NULL}, 0, 0, S_RIDEROID}, // S_RIDEROID
|
||||
{SPR_RDRC, FF_ANIMATE|FF_FULLBRIGHT|FF_TRANS30, -1, {NULL}, 3, 2, S_RIDEROID_ICON}, // S_RIDEROID_ICON
|
||||
|
||||
// Dead Line
|
||||
{SPR_DLZH, 0, -1, {NULL}, 0, 0, S_DLZHOVER}, // S_DLZHOVER
|
||||
|
||||
{SPR_DLZR, 0, -1, {NULL}, 0, 0, S_DLZROCKET_L}, // S_DLZROCKET_L
|
||||
{SPR_DLZR, 1, -1, {NULL}, 0, 0, S_DLZROCKET_R}, // S_DLZROCKET_R
|
||||
|
||||
// Water Palace
|
||||
{SPR_WPZF, 0, -1, {NULL}, 0, 0, S_WPZFOUNTAIN}, // S_WPZFOUNTAIN
|
||||
{SPR_WPZF, 1|FF_ANIMATE, -1, {NULL}, 3, 2, S_WPZFOUNTAINANIM}, // S_WPZFOUNTAINANIM
|
||||
{SPR_WPZK, FF_ANIMATE, -1, {NULL}, 3, 12, S_KURAGEN}, // S_KURAGEN
|
||||
{SPR_WPZK, 4, -1, {NULL}, 0, 0, S_KURAGENBOMB}, // S_KURAGENBOMB
|
||||
};
|
||||
|
||||
mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||
|
|
@ -30730,6 +30742,141 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_WATERPALACETURBINE
|
||||
3400, // doomednum
|
||||
S_INVISIBLE, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
32*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOGRAVITY|MF_NOBLOCKMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_WATERPALACEBUBBLE
|
||||
-1, // doomednum
|
||||
S_INVISIBLE, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
32*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOGRAVITY|MF_NOBLOCKMAP|MF_NOCLIP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_WATERPALACEFOUNTAIN
|
||||
3401, // doomednum
|
||||
S_WPZFOUNTAIN, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
0, // display offset
|
||||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_KURAGEN
|
||||
3402, // doomednum
|
||||
S_KURAGEN, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
0, // display offset
|
||||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_KURAGENBOMB
|
||||
-1, // doomednum
|
||||
S_KURAGENBOMB, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
64*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
0, // display offset
|
||||
0, // mass
|
||||
DMG_EXPLODE, // damage
|
||||
sfx_None, // activesound
|
||||
MF_PAIN, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
skincolor_t skincolors[MAXSKINCOLORS] = {
|
||||
|
|
|
|||
18
src/info.h
18
src/info.h
|
|
@ -1458,6 +1458,11 @@ typedef enum sprite
|
|||
SPR_DLZS, // DLZ Seasaw
|
||||
SPR_DLZA, // Helper arrows for rocket
|
||||
|
||||
SPR_WPWL, // turbine
|
||||
SPR_WPZF, // fountain
|
||||
SPR_WPZK, // klagen
|
||||
|
||||
|
||||
// First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later
|
||||
SPR_VIEW,
|
||||
|
||||
|
|
@ -5866,6 +5871,13 @@ typedef enum state
|
|||
S_DLZROCKET_L,
|
||||
S_DLZROCKET_R,
|
||||
|
||||
// water palace zone
|
||||
S_WPZFOUNTAIN,
|
||||
S_WPZFOUNTAINANIM,
|
||||
S_KURAGEN,
|
||||
S_KURAGENBOMB,
|
||||
|
||||
|
||||
S_FIRSTFREESLOT,
|
||||
S_LASTFREESLOT = S_FIRSTFREESLOT + NUMSTATEFREESLOTS - 1,
|
||||
NUMSTATES
|
||||
|
|
@ -7052,6 +7064,12 @@ typedef enum mobj_type
|
|||
MT_DLZ_RINGVACCUM,
|
||||
MT_DLZ_SUCKEDRING,
|
||||
|
||||
MT_WATERPALACETURBINE,
|
||||
MT_WATERPALACEBUBBLE,
|
||||
MT_WATERPALACEFOUNTAIN,
|
||||
MT_KURAGEN,
|
||||
MT_KURAGENBOMB,
|
||||
|
||||
MT_FIRSTFREESLOT,
|
||||
MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1,
|
||||
NUMMOBJTYPES
|
||||
|
|
|
|||
12
src/k_kart.c
12
src/k_kart.c
|
|
@ -57,6 +57,18 @@
|
|||
// comeback is Battle Mode's karma comeback, also bool
|
||||
// mapreset is set when enough players fill an empty server
|
||||
|
||||
// lat: used for when the player is in some weird state where it wouldn't be wise for it to be overwritten by another object that does similarly wacky shit.
|
||||
boolean K_isPlayerInSpecialState(player_t *p)
|
||||
{
|
||||
return (
|
||||
p->rideroid
|
||||
|| p->bungee
|
||||
|| p->dlzrocket
|
||||
|| p->seasaw
|
||||
|| p->turbine
|
||||
);
|
||||
}
|
||||
|
||||
boolean K_IsDuelItem(mobjtype_t type)
|
||||
{
|
||||
switch (type)
|
||||
|
|
|
|||
|
|
@ -228,6 +228,9 @@ UINT32 K_PointLimitForGametype(void);
|
|||
|
||||
boolean K_Cooperative(void);
|
||||
|
||||
// lat: used for when the player is in some weird state where it wouldn't be wise for it to be overwritten by another object that does similarly wacky shit.
|
||||
boolean K_isPlayerInSpecialState(player_t *p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ void Obj_BungeeSpecial(mobj_t *mo, player_t *p)
|
|||
|
||||
mobj_t *latch;
|
||||
|
||||
if (p->bungee || P_IsObjectOnGround(p->mo) || p->springstars)
|
||||
if (P_IsObjectOnGround(p->mo) || p->springstars || K_isPlayerInSpecialState(p))
|
||||
return;
|
||||
|
||||
P_InstaThrust(p->mo, 0, 0);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void Obj_DLZRocketDismount(player_t *p)
|
|||
// touching the rocket, initialize player vars etc...
|
||||
void Obj_DLZRocketSpecial(mobj_t *mo, player_t *p)
|
||||
{
|
||||
if (p->dlzrocket) // already on one, don't bother resetting, duh.
|
||||
if (K_isPlayerInSpecialState(p)) // already on one, don't bother resetting, duh.
|
||||
return;
|
||||
|
||||
p->mo->z = mo->z + 16*P_MobjFlip(p->mo)*mapobjectscale;
|
||||
|
|
|
|||
|
|
@ -308,6 +308,10 @@ void Obj_DLZSeasawCollide(mobj_t *mo, mobj_t *mo2)
|
|||
// cooldown / respawning
|
||||
if (p->seasawcooldown || p->respawn.timer)
|
||||
return;
|
||||
|
||||
// other wacko state that'd do very weird shit if we overwrote it.
|
||||
if (K_isPlayerInSpecialState(p))
|
||||
return;
|
||||
|
||||
// another player is already using the seasar
|
||||
if (mo2->target && !P_MobjWasRemoved(mo2->target) && mo2->target->target && !P_MobjWasRemoved(mo2->target->target))
|
||||
|
|
|
|||
|
|
@ -510,7 +510,8 @@ void Obj_RideroidNodeThink(mobj_t *mo)
|
|||
// check for players coming near us.
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || players[i].rideroid || players[i].rdnodepull)
|
||||
if (!playeringame[i] || players[i].spectator || players[i].rideroid ||
|
||||
players[i].rdnodepull || K_isPlayerInSpecialState(&players[i]) || P_PlayerInPain(&players[i]))
|
||||
continue;
|
||||
|
||||
pmo = players[i].mo;
|
||||
|
|
|
|||
|
|
@ -580,6 +580,11 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
|||
WRITEINT32(save->p, players[i].seasawmoreangle);
|
||||
WRITEUINT8(save->p, players[i].seasawdir);
|
||||
|
||||
WRITEUINT32(save->p, players[i].turbine);
|
||||
WRITEINT32(save->p, players[i].turbineangle);
|
||||
WRITEFIXED(save->p, players[i].turbineheight);
|
||||
WRITEUINT8(save->p, players[i].turbinespd);
|
||||
|
||||
// respawnvars_t
|
||||
WRITEUINT8(save->p, players[i].respawn.state);
|
||||
WRITEUINT32(save->p, K_GetWaypointHeapIndex(players[i].respawn.wp));
|
||||
|
|
@ -1082,6 +1087,11 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
|||
players[i].seasawmoreangle = READINT32(save->p);
|
||||
players[i].seasawdir = READUINT8(save->p);
|
||||
|
||||
players[i].turbine = READUINT32(save->p);
|
||||
players[i].turbineangle = READINT32(save->p);
|
||||
players[i].turbineheight = READFIXED(save->p);
|
||||
players[i].turbinespd = READUINT8(save->p);
|
||||
|
||||
// respawnvars_t
|
||||
players[i].respawn.state = READUINT8(save->p);
|
||||
players[i].respawn.wp = (waypoint_t *)(size_t)READUINT32(save->p);
|
||||
|
|
|
|||
|
|
@ -7263,7 +7263,7 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
case 3786: // MT_BATTLEUFO_SPAWNER
|
||||
mapthings[i].thing_args[0] = mapthings[i].angle;
|
||||
break;
|
||||
case 3400: // MT_WATERPALACETURBINE (TODO: not yet hardcoded)
|
||||
case 3400: // MT_WATERPALACETURBINE
|
||||
{
|
||||
mtag_t tag = (mtag_t)mapthings[i].angle;
|
||||
INT32 j = Tag_FindLineSpecial(2009, tag);
|
||||
|
|
@ -7312,8 +7312,8 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
|
||||
break;
|
||||
}
|
||||
case 3441: // MT_DASHRING (TODO: not yet hardcoded)
|
||||
case 3442: // MT_RAINBOWDASHRING (TODO: not yet hardcoded)
|
||||
case 3441: // MT_DASHRING
|
||||
case 3442: // MT_RAINBOWDASHRING
|
||||
mapthings[i].thing_args[0] = mapthings[i].options & 13;
|
||||
mapthings[i].thing_args[1] = mapthings[i].extrainfo;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue