mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-05 01:38:13 +00:00
Make Kart Z FOF Thwomp delay use args
This commit is contained in:
parent
7ceab1f101
commit
a8ac5a9922
5 changed files with 15 additions and 6 deletions
|
|
@ -1058,14 +1058,18 @@ void T_ThwompSector(thwomp_t *thwomp)
|
|||
INT32 secnum;
|
||||
fixed_t speed;
|
||||
|
||||
if (thwompsactive == false)
|
||||
{
|
||||
// Ring Racers: Rest until Lap 2
|
||||
return;
|
||||
}
|
||||
|
||||
// SRB2kart 170217 - Thwomps are automatic.
|
||||
// Put up a timer before you start falling down.
|
||||
// I could of used rowoffset, but the FOF actually
|
||||
// modifies the textures's Y offset. It doesn't with
|
||||
// textureoffset, so Effect 4 can be ignored as usual.
|
||||
if ((thwomp->sourceline->flags & ML_SKEWTD) // FIXME: UDMFify
|
||||
&& leveltime < (unsigned)(sides[thwomp->sourceline->sidenum[0]].textureoffset>>FRACBITS))
|
||||
thwomp->direction = 0;
|
||||
if (--thwomp->initDelay > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If you just crashed down, wait a second before coming back up.
|
||||
if (--thwomp->delay > 0)
|
||||
|
|
|
|||
|
|
@ -2259,6 +2259,7 @@ static void SaveThwompThinker(const thinker_t *th, const UINT8 type)
|
|||
WRITEINT32(save_p, ht->delay);
|
||||
WRITEINT16(save_p, ht->tag);
|
||||
WRITEUINT16(save_p, ht->sound);
|
||||
WRITEINT32(save_p, ht->initDelay);
|
||||
}
|
||||
|
||||
static void SaveFloatThinker(const thinker_t *th, const UINT8 type)
|
||||
|
|
|
|||
|
|
@ -4529,6 +4529,8 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
}
|
||||
if (lines[i].flags & ML_MIDSOLID)
|
||||
P_WriteConstant(sides[lines[i].sidenum[0]].textureoffset >> FRACBITS, &lines[i].stringargs[0]);
|
||||
if (lines[i].flags & ML_SKEWTD) // Kart Z delay. Yes, it used the same field as the above.
|
||||
lines[i].args[3] = (unsigned)(sides[lines[i].sidenum[0]].textureoffset >> FRACBITS);
|
||||
break;
|
||||
case 252: //FOF: Shatter block
|
||||
case 253: //FOF: Shatter block, translucent
|
||||
|
|
|
|||
|
|
@ -5469,6 +5469,7 @@ static inline void P_AddThwompThinker(sector_t *sec, line_t *sourceline, fixed_t
|
|||
thwomp->delay = 1;
|
||||
thwomp->tag = sourceline->args[0];
|
||||
thwomp->sound = sound;
|
||||
thwomp->initDelay = sourceline->args[3];
|
||||
|
||||
sec->floordata = thwomp;
|
||||
sec->ceilingdata = thwomp;
|
||||
|
|
|
|||
|
|
@ -848,6 +848,7 @@ typedef struct
|
|||
INT32 delay;
|
||||
INT16 tag;
|
||||
UINT16 sound;
|
||||
INT32 initDelay;
|
||||
} thwomp_t;
|
||||
|
||||
typedef struct
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue