Define DLZ objects/player variables

This commit is contained in:
Lat 2023-09-21 09:24:15 +02:00
parent 6ff02ab075
commit 02409c5540
5 changed files with 253 additions and 0 deletions

View file

@ -737,6 +737,27 @@ struct player_t
////////////
UINT8 bungee; // constants are defined with the object file for the bungee.
////////////////////
// dead line zone //
////////////////////
// hovers
tic_t lasthover; // used for the hover mobjs
// rockets
boolean dlzrocket; // true if latched onto a dlz rocket.
angle_t dlzrocketangle; // current travel angle with the rocket.
angle_t dlzrocketanglev; // current vertical travel angle with the rocket.
fixed_t dlzrocketspd; // current rocket travel speed.
// seasaws (variables are shared with other seasaw-like objects)
boolean seasaw; // true if using a seasaw
tic_t seasawcooldown; // cooldown to avoid triggering the same seasaw over and over
fixed_t seasawdist; // distance from the center of the seasaw when latched.
angle_t seasawangle; // angle from the center of the seasaw when latched.
angle_t seasawangleadd; // used to spin the seasaw
boolean seasawdir; // flips or not seasaw rotation
//
SINT8 lives;

View file

@ -4674,6 +4674,10 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
"S_RIDEROID",
"S_RIDEROID_ICON",
"S_DLZHOVER",
"S_DLZROCKET_L",
"S_DLZROCKET_R",
};
// RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1",
@ -5833,6 +5837,14 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
"MT_LSZ_BUNGEE",
"MT_LSZ_EGGBALLSPAWNER",
"MT_LSZ_EGGBALL",
"MT_DLZ_HOVER",
"MT_DLZ_ROCKET",
"MT_DLZ_SEASAW_SPAWN",
"MT_DLZ_SEASAW_HITBOX",
"MT_DLZ_SEASAW_VISUAL",
"MT_DLZ_RINGVACCUM",
"MT_DLZ_SUCKEDRING",
};
const char *const MOBJFLAG_LIST[] = {

View file

@ -901,6 +901,12 @@ char sprnames[NUMSPRITES + 1][5] =
// leaf storm egg ball.
"LSZB",
// Dead Line Zone
"DLZH",
"DLZR",
"DLZS",
"DLZA",
// First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later
"VIEW",
};
@ -5429,6 +5435,12 @@ state_t states[NUMSTATES] =
{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
{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
};
mobjinfo_t mobjinfo[NUMMOBJTYPES] =
@ -30528,6 +30540,168 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
MF_PAIN, // flags
S_NULL // raisestate
},
{ // MT_DLZ_HOVER,
3430, // doomednum
S_DLZHOVER, // 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
100*FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY|MF_SOLID, // flags
S_NULL // raisestate
},
{ // MT_DLZ_ROCKET,
3431, // 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
100*FRACUNIT, // radius
64*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY|MF_SPECIAL, // flags
S_NULL // raisestate
},
{ // MT_DLZ_SEASAW_SPAWN,
3432, // 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
0, // flags
S_NULL // raisestate
},
{ // MT_DLZ_SEASAW_HITBOX,
-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
8*FRACUNIT, // radius
40*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SOLID, // flags
S_NULL // raisestate
},
{ // MT_DLZ_SEASAW_VISUAL,
-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
40*FRACUNIT, // radius
64*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_DLZ_RINGVACCUM,
3443, // 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
96*FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SOLID, // flags
S_NULL // raisestate
},
};

View file

@ -1453,6 +1453,11 @@ typedef enum sprite
SPR_LSZB, // eggman ball.
SPR_DLZH, // DLZ Hover
SPR_DLZR, // DLZ Rocket
SPR_DLZS, // DLZ Seasaw
SPR_DLZA, // Helper arrows for rocket
// First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later
SPR_VIEW,
@ -5856,6 +5861,11 @@ typedef enum state
S_RIDEROID,
S_RIDEROID_ICON,
// dead line zone
S_DLZHOVER,
S_DLZROCKET_L,
S_DLZROCKET_R,
S_FIRSTFREESLOT,
S_LASTFREESLOT = S_FIRSTFREESLOT + NUMSTATEFREESLOTS - 1,
NUMSTATES
@ -7034,6 +7044,14 @@ typedef enum mobj_type
MT_LSZ_EGGBALLSPAWNER,
MT_LSZ_EGGBALL,
MT_DLZ_HOVER,
MT_DLZ_ROCKET,
MT_DLZ_SEASAW_SPAWN,
MT_DLZ_SEASAW_HITBOX,
MT_DLZ_SEASAW_VISUAL,
MT_DLZ_RINGVACCUM,
MT_DLZ_SUCKEDRING,
MT_FIRSTFREESLOT,
MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1,
NUMMOBJTYPES

View file

@ -565,6 +565,20 @@ static void P_NetArchivePlayers(savebuffer_t *save)
WRITEUINT8(save->p, players[i].bungee);
WRITEUINT32(save->p, players[i].lasthover);
WRITEUINT8(save->p, players[i].dlzrocket);
WRITEUINT32(save->p, players[i].dlzrocketangle);
WRITEUINT32(save->p, players[i].dlzrocketanglev);
WRITEUINT32(save->p, players[i].dlzrocketspd);
WRITEUINT8(save->p, players[i].seasaw);
WRITEUINT32(save->p, players[i].seasawcooldown);
WRITEUINT32(save->p, players[i].seasawdist);
WRITEUINT32(save->p, players[i].seasawangle);
WRITEUINT32(save->p, players[i].seasawangleadd);
WRITEUINT8(save->p, players[i].seasawdir);
// respawnvars_t
WRITEUINT8(save->p, players[i].respawn.state);
WRITEUINT32(save->p, K_GetWaypointHeapIndex(players[i].respawn.wp));
@ -1051,6 +1065,20 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
players[i].rdaddmomz = READFIXED(save->p);
players[i].bungee = READUINT8(save->p);
players[i].lasthover = READUINT32(save->p);
players[i].dlzrocket = READUINT8(save->p);
players[i].dlzrocketangle = READUINT32(save->p);
players[i].dlzrocketanglev = READUINT32(save->p);
players[i].dlzrocketspd = READUINT32(save->p);
players[i].seasaw = READUINT8(save->p);
players[i].seasawcooldown = READUINT32(save->p);
players[i].seasawdist = READUINT32(save->p);
players[i].seasawangle = READUINT32(save->p);
players[i].seasawangleadd = READUINT32(save->p);
players[i].seasawdir = READUINT8(save->p);
// respawnvars_t
players[i].respawn.state = READUINT8(save->p);