mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-22 13:31:15 +00:00
Merge branch 'srb2-tidy' into 'master'
Clear out unused SRB2/Kart stuff from info tables See merge request KartKrew/Kart!1811
This commit is contained in:
commit
4ea946067a
29 changed files with 158 additions and 21003 deletions
|
|
@ -931,7 +931,7 @@ boolean CON_Responder(event_t *ev)
|
|||
if (ev->type != ev_console)
|
||||
{
|
||||
#ifndef DEVELOP // I have driven this course 45 times and I just want to give myself rocketsneakers
|
||||
if (modeattacking || metalrecording || marathonmode)
|
||||
if (modeattacking || marathonmode)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2638,10 +2638,6 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
|
|||
|
||||
void CL_Reset(void)
|
||||
{
|
||||
if (metalrecording)
|
||||
G_StopMetalRecording(false);
|
||||
if (metalplayback)
|
||||
G_StopMetalDemo();
|
||||
if (demo.recording)
|
||||
G_CheckDemoStatus();
|
||||
|
||||
|
|
@ -3917,8 +3913,6 @@ boolean SV_SpawnServer(void)
|
|||
boolean result = false;
|
||||
if (demo.playback)
|
||||
G_StopDemo(); // reset engine parameter
|
||||
if (metalplayback)
|
||||
G_StopMetalDemo();
|
||||
|
||||
if (!serverrunning)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1865,12 +1865,7 @@ void D_SRB2Main(void)
|
|||
|
||||
// check for a driver that wants intermission stats
|
||||
// start the apropriate game based on parms
|
||||
if (M_CheckParm("-metal"))
|
||||
{
|
||||
G_RecordMetal();
|
||||
autostart = true;
|
||||
}
|
||||
else if (M_CheckParm("-record") && M_IsNextParm())
|
||||
if (M_CheckParm("-record") && M_IsNextParm())
|
||||
{
|
||||
G_RecordDemo(M_GetNextParm());
|
||||
autostart = true;
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ static void Command_Addfile(void);
|
|||
static void Command_ListWADS_f(void);
|
||||
static void Command_ListDoomednums_f(void);
|
||||
static void Command_cxdiag_f(void);
|
||||
static void Command_ListUnusedSprites_f(void);
|
||||
static void Command_RunSOC(void);
|
||||
static void Command_Pause(void);
|
||||
|
||||
|
|
@ -399,6 +400,7 @@ void D_RegisterServerCommands(void)
|
|||
COM_AddDebugCommand("listwad", Command_ListWADS_f);
|
||||
COM_AddDebugCommand("listmapthings", Command_ListDoomednums_f);
|
||||
COM_AddDebugCommand("cxdiag", Command_cxdiag_f);
|
||||
COM_AddCommand("listunusedsprites", Command_ListUnusedSprites_f);
|
||||
|
||||
COM_AddCommand("runsoc", Command_RunSOC);
|
||||
COM_AddCommand("pause", Command_Pause);
|
||||
|
|
@ -2019,8 +2021,6 @@ static void Command_Playdemo_f(void)
|
|||
// disconnect from server here?
|
||||
if (demo.playback)
|
||||
G_StopDemo();
|
||||
if (metalplayback)
|
||||
G_StopMetalDemo();
|
||||
|
||||
// open the demo file
|
||||
strcpy(name, COM_Argv(1));
|
||||
|
|
@ -2058,8 +2058,6 @@ static void Command_Timedemo_f(void)
|
|||
// disconnect from server here?
|
||||
if (demo.playback)
|
||||
G_StopDemo();
|
||||
if (metalplayback)
|
||||
G_StopMetalDemo();
|
||||
|
||||
// open the demo file
|
||||
strcpy (timedemo_name, COM_Argv(1));
|
||||
|
|
@ -5016,6 +5014,46 @@ static void Command_cxdiag_f(void)
|
|||
CONS_Printf("\x83""No errors detected! Good job\n");
|
||||
}
|
||||
|
||||
void Command_ListUnusedSprites_f(void)
|
||||
{
|
||||
size_t i, j;
|
||||
|
||||
CONS_Printf("\x82Printing sprite non-usage...\n");
|
||||
|
||||
for (i = 0; i < NUMSPRITES; i++)
|
||||
{
|
||||
if (sprites[i].numframes)
|
||||
{
|
||||
// We're only showing unused sprites...
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i < SPR_FIRSTFREESLOT)
|
||||
{
|
||||
CONS_Printf(" \x87""hardcode SPR_""%.4s\n", sprnames[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (used_spr[(i-SPR_FIRSTFREESLOT)/8] == 0xFF)
|
||||
{
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
CONS_Printf(" \x81""freeslot SPR_""%.4s\n", sprnames[i+j]);
|
||||
}
|
||||
|
||||
i += j;
|
||||
}
|
||||
|
||||
if (used_spr[(i-SPR_FIRSTFREESLOT)/8] & (1<<(i%8)))
|
||||
{
|
||||
CONS_Printf(" \x81""freeslot SPR_""%.4s\n", sprnames[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// MISC. COMMANDS
|
||||
// =========================================================================
|
||||
|
|
|
|||
2461
src/deh_tables.c
2461
src/deh_tables.c
File diff suppressed because it is too large
Load diff
|
|
@ -193,7 +193,6 @@ extern UINT16 musicwads;
|
|||
extern boolean savemoddata; // This mod saves time/emblem data.
|
||||
extern boolean usedCheats;
|
||||
extern boolean imcontinuing; // Temporary flag while continuing
|
||||
extern boolean metalrecording;
|
||||
|
||||
#define ATTACKING_NONE 0
|
||||
#define ATTACKING_TIME 1
|
||||
|
|
|
|||
508
src/g_demo.c
508
src/g_demo.c
|
|
@ -69,12 +69,6 @@ boolean demosynced = true; // console warning message
|
|||
|
||||
struct demovars_s demo;
|
||||
|
||||
boolean metalrecording; // recording as metal sonic
|
||||
mobj_t *metalplayback;
|
||||
static UINT8 *metalbuffer = NULL;
|
||||
static UINT8 *metal_p;
|
||||
static UINT16 metalversion;
|
||||
|
||||
// extra data stuff (events registered this frame while recording)
|
||||
static struct {
|
||||
UINT8 flags; // EZT flags
|
||||
|
|
@ -153,9 +147,6 @@ UINT8 demo_extradata[MAXPLAYERS];
|
|||
UINT8 demo_writerng; // 0=no, 1=yes, 2=yes but on a timeout
|
||||
static ticcmd_t oldcmd[MAXPLAYERS];
|
||||
|
||||
#define METALDEATH 0x44
|
||||
#define METALSNICE 0x69
|
||||
|
||||
#define DW_END 0xFF // End of extradata block
|
||||
#define DW_RNG 0xFE // Check RNG seed!
|
||||
|
||||
|
|
@ -164,7 +155,7 @@ static ticcmd_t oldcmd[MAXPLAYERS];
|
|||
// Below consts are only used for demo extrainfo sections
|
||||
#define DW_STANDING 0x00
|
||||
|
||||
// For Metal Sonic and time attack ghosts
|
||||
// For time attack ghosts
|
||||
#define GZT_XYZ 0x01
|
||||
#define GZT_MOMXY 0x02
|
||||
#define GZT_MOMZ 0x04
|
||||
|
|
@ -191,22 +182,7 @@ static ticcmd_t oldcmd[MAXPLAYERS];
|
|||
#define FZT_SCALE 0x10 // different scale to object
|
||||
// spare FZT slots 0x20 to 0x80
|
||||
|
||||
static mobj_t oldmetal, oldghost[MAXPLAYERS];
|
||||
|
||||
void G_SaveMetal(UINT8 **buffer)
|
||||
{
|
||||
I_Assert(buffer != NULL && *buffer != NULL);
|
||||
|
||||
WRITEUINT32(*buffer, metal_p - metalbuffer);
|
||||
}
|
||||
|
||||
void G_LoadMetal(UINT8 **buffer)
|
||||
{
|
||||
I_Assert(buffer != NULL && *buffer != NULL);
|
||||
|
||||
G_DoPlayMetal();
|
||||
metal_p = metalbuffer + READUINT32(*buffer);
|
||||
}
|
||||
static mobj_t oldghost[MAXPLAYERS];
|
||||
|
||||
void G_ReadDemoExtraData(void)
|
||||
{
|
||||
|
|
@ -691,7 +667,7 @@ void G_WriteDemoTiccmd(ticcmd_t *cmd, INT32 playernum)
|
|||
|
||||
void G_GhostAddFlip(INT32 playernum)
|
||||
{
|
||||
if (!metalrecording && (!demo.recording || !(demoflags & DF_GHOST)))
|
||||
if ((!demo.recording || !(demoflags & DF_GHOST)))
|
||||
return;
|
||||
ghostext[playernum].flags |= EZT_FLIP;
|
||||
}
|
||||
|
|
@ -711,7 +687,7 @@ void G_GhostAddColor(INT32 playernum, ghostcolor_t color)
|
|||
|
||||
void G_GhostAddScale(INT32 playernum, fixed_t scale)
|
||||
{
|
||||
if (!metalrecording && (!demo.recording || !(demoflags & DF_GHOST)))
|
||||
if ((!demo.recording || !(demoflags & DF_GHOST)))
|
||||
return;
|
||||
if (ghostext[playernum].lastscale == scale)
|
||||
{
|
||||
|
|
@ -1760,336 +1736,6 @@ void G_ConfirmRewind(tic_t rewindtime)
|
|||
P_ResetCamera(&players[displayplayers[i]], &camera[i]);
|
||||
}
|
||||
|
||||
void G_ReadMetalTic(mobj_t *metal)
|
||||
{
|
||||
UINT8 ziptic;
|
||||
UINT8 xziptic = 0;
|
||||
|
||||
if (!metal_p)
|
||||
return;
|
||||
|
||||
if (!metal->health)
|
||||
{
|
||||
G_StopMetalDemo();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (*metal_p)
|
||||
{
|
||||
case METALSNICE:
|
||||
break;
|
||||
case METALDEATH:
|
||||
if (metal->tracer)
|
||||
P_RemoveMobj(metal->tracer);
|
||||
P_KillMobj(metal, NULL, NULL, DMG_NORMAL);
|
||||
/* FALLTHRU */
|
||||
case DEMOMARKER:
|
||||
default:
|
||||
// end of demo data stream
|
||||
G_StopMetalDemo();
|
||||
return;
|
||||
}
|
||||
metal_p++;
|
||||
|
||||
ziptic = READUINT8(metal_p);
|
||||
|
||||
// Read changes from the tic
|
||||
if (ziptic & GZT_XYZ)
|
||||
{
|
||||
// make sure the values are read in the right order
|
||||
oldmetal.x = READFIXED(metal_p);
|
||||
oldmetal.y = READFIXED(metal_p);
|
||||
oldmetal.z = READFIXED(metal_p);
|
||||
P_MoveOrigin(metal, oldmetal.x, oldmetal.y, oldmetal.z);
|
||||
oldmetal.x = metal->x;
|
||||
oldmetal.y = metal->y;
|
||||
oldmetal.z = metal->z;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ziptic & GZT_MOMXY)
|
||||
{
|
||||
oldmetal.momx = (metalversion < 0x000e) ? READINT16(metal_p)<<8 : READFIXED(metal_p);
|
||||
oldmetal.momy = (metalversion < 0x000e) ? READINT16(metal_p)<<8 : READFIXED(metal_p);
|
||||
}
|
||||
if (ziptic & GZT_MOMZ)
|
||||
oldmetal.momz = (metalversion < 0x000e) ? READINT16(metal_p)<<8 : READFIXED(metal_p);
|
||||
oldmetal.x += oldmetal.momx;
|
||||
oldmetal.y += oldmetal.momy;
|
||||
oldmetal.z += oldmetal.momz;
|
||||
}
|
||||
if (ziptic & GZT_ANGLE)
|
||||
metal->angle = READUINT8(metal_p)<<24;
|
||||
if (ziptic & GZT_FRAME)
|
||||
oldmetal.frame = READUINT32(metal_p);
|
||||
if (ziptic & GZT_SPR2)
|
||||
oldmetal.sprite2 = READUINT8(metal_p);
|
||||
|
||||
// Set movement, position, and angle
|
||||
// oldmetal contains where you're supposed to be.
|
||||
metal->momx = oldmetal.momx;
|
||||
metal->momy = oldmetal.momy;
|
||||
metal->momz = oldmetal.momz;
|
||||
P_UnsetThingPosition(metal);
|
||||
metal->x = oldmetal.x;
|
||||
metal->y = oldmetal.y;
|
||||
metal->z = oldmetal.z;
|
||||
P_SetThingPosition(metal);
|
||||
metal->frame = oldmetal.frame;
|
||||
metal->sprite2 = oldmetal.sprite2;
|
||||
|
||||
if (ziptic & GZT_EXTRA)
|
||||
{ // But wait, there's more!
|
||||
xziptic = READUINT8(metal_p);
|
||||
if (xziptic & EZT_FLIP)
|
||||
{
|
||||
metal->eflags ^= MFE_VERTICALFLIP;
|
||||
metal->flags2 ^= MF2_OBJECTFLIP;
|
||||
}
|
||||
if (xziptic & EZT_SCALE)
|
||||
{
|
||||
metal->destscale = READFIXED(metal_p);
|
||||
if (metal->destscale != metal->scale)
|
||||
P_SetScale(metal, metal->destscale);
|
||||
}
|
||||
if (xziptic & EZT_SPRITE)
|
||||
metal->sprite = READUINT16(metal_p);
|
||||
}
|
||||
|
||||
#define follow metal->tracer
|
||||
if (ziptic & GZT_FOLLOW)
|
||||
{ // Even more...
|
||||
UINT8 followtic = READUINT8(metal_p);
|
||||
fixed_t temp;
|
||||
if (followtic & FZT_SPAWNED)
|
||||
{
|
||||
if (follow)
|
||||
P_RemoveMobj(follow);
|
||||
P_SetTarget(&follow, P_SpawnMobjFromMobj(metal, 0, 0, 0, MT_GHOST));
|
||||
P_SetTarget(&follow->tracer, metal);
|
||||
follow->tics = -1;
|
||||
temp = READINT16(metal_p)<<FRACBITS;
|
||||
follow->height = FixedMul(follow->scale, temp);
|
||||
|
||||
if (followtic & FZT_LINKDRAW)
|
||||
follow->flags2 |= MF2_LINKDRAW;
|
||||
|
||||
if (followtic & FZT_COLORIZED)
|
||||
follow->colorized = true;
|
||||
|
||||
if (followtic & FZT_SKIN)
|
||||
follow->skin = &skins[READUINT8(metal_p)];
|
||||
}
|
||||
if (follow)
|
||||
{
|
||||
if (followtic & FZT_SCALE)
|
||||
follow->destscale = READFIXED(metal_p);
|
||||
else
|
||||
follow->destscale = metal->destscale;
|
||||
if (follow->destscale != follow->scale)
|
||||
P_SetScale(follow, follow->destscale);
|
||||
|
||||
P_UnsetThingPosition(follow);
|
||||
temp = (metalversion < 0x000e) ? READINT16(metal_p)<<8 : READFIXED(metal_p);
|
||||
follow->x = metal->x + temp;
|
||||
temp = (metalversion < 0x000e) ? READINT16(metal_p)<<8 : READFIXED(metal_p);
|
||||
follow->y = metal->y + temp;
|
||||
temp = (metalversion < 0x000e) ? READINT16(metal_p)<<8 : READFIXED(metal_p);
|
||||
follow->z = metal->z + temp;
|
||||
P_SetThingPosition(follow);
|
||||
if (followtic & FZT_SKIN)
|
||||
follow->sprite2 = READUINT8(metal_p);
|
||||
else
|
||||
follow->sprite2 = 0;
|
||||
follow->sprite = READUINT16(metal_p);
|
||||
follow->frame = READUINT32(metal_p); // NOT & FF_FRAMEMASK here, so 32 bits
|
||||
follow->angle = metal->angle;
|
||||
follow->color = READUINT16(metal_p);
|
||||
|
||||
if (!(followtic & FZT_SPAWNED))
|
||||
{
|
||||
if (xziptic & EZT_FLIP)
|
||||
{
|
||||
follow->flags2 ^= MF2_OBJECTFLIP;
|
||||
follow->eflags ^= MFE_VERTICALFLIP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (follow)
|
||||
{
|
||||
P_RemoveMobj(follow);
|
||||
P_SetTarget(&follow, NULL);
|
||||
}
|
||||
#undef follow
|
||||
}
|
||||
|
||||
void G_WriteMetalTic(mobj_t *metal)
|
||||
{
|
||||
UINT8 ziptic = 0;
|
||||
UINT8 *ziptic_p;
|
||||
|
||||
if (!demobuf.p) // demobuf.p will be NULL until the race start linedef executor is activated!
|
||||
return;
|
||||
|
||||
WRITEUINT8(demobuf.p, METALSNICE);
|
||||
ziptic_p = demobuf.p++; // the ziptic, written at the end of this function
|
||||
|
||||
#define MAXMOM (0xFFFF<<8)
|
||||
|
||||
// GZT_XYZ is only useful if you've moved 256 FRACUNITS or more in a single tic.
|
||||
if (abs(metal->x-oldmetal.x) > MAXMOM
|
||||
|| abs(metal->y-oldmetal.y) > MAXMOM
|
||||
|| abs(metal->z-oldmetal.z) > MAXMOM)
|
||||
{
|
||||
oldmetal.x = metal->x;
|
||||
oldmetal.y = metal->y;
|
||||
oldmetal.z = metal->z;
|
||||
ziptic |= GZT_XYZ;
|
||||
WRITEFIXED(demobuf.p,oldmetal.x);
|
||||
WRITEFIXED(demobuf.p,oldmetal.y);
|
||||
WRITEFIXED(demobuf.p,oldmetal.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For moving normally:
|
||||
// Store movement as a fixed value
|
||||
fixed_t momx = metal->x-oldmetal.x;
|
||||
fixed_t momy = metal->y-oldmetal.y;
|
||||
if (momx != oldmetal.momx
|
||||
|| momy != oldmetal.momy)
|
||||
{
|
||||
oldmetal.momx = momx;
|
||||
oldmetal.momy = momy;
|
||||
ziptic |= GZT_MOMXY;
|
||||
WRITEFIXED(demobuf.p,momx);
|
||||
WRITEFIXED(demobuf.p,momy);
|
||||
}
|
||||
momx = metal->z-oldmetal.z;
|
||||
if (momx != oldmetal.momz)
|
||||
{
|
||||
oldmetal.momz = momx;
|
||||
ziptic |= GZT_MOMZ;
|
||||
WRITEFIXED(demobuf.p,momx);
|
||||
}
|
||||
|
||||
// This SHOULD set oldmetal.x/y/z to match metal->x/y/z
|
||||
oldmetal.x += oldmetal.momx;
|
||||
oldmetal.y += oldmetal.momy;
|
||||
oldmetal.z += oldmetal.momz;
|
||||
}
|
||||
|
||||
#undef MAXMOM
|
||||
|
||||
// Only store the 8 most relevant bits of angle
|
||||
// because exact values aren't too easy to discern to begin with when only 8 angles have different sprites
|
||||
// and it does not affect movement at all anyway.
|
||||
if (metal->player && metal->player->drawangle>>24 != oldmetal.angle)
|
||||
{
|
||||
oldmetal.angle = metal->player->drawangle>>24;
|
||||
ziptic |= GZT_ANGLE;
|
||||
WRITEUINT8(demobuf.p,oldmetal.angle);
|
||||
}
|
||||
|
||||
// Store the sprite frame.
|
||||
if ((metal->frame & FF_FRAMEMASK) != oldmetal.frame)
|
||||
{
|
||||
oldmetal.frame = metal->frame; // NOT & FF_FRAMEMASK here, so 32 bits
|
||||
ziptic |= GZT_FRAME;
|
||||
WRITEUINT32(demobuf.p,oldmetal.frame);
|
||||
}
|
||||
|
||||
if (metal->sprite == SPR_PLAY
|
||||
&& metal->sprite2 != oldmetal.sprite2)
|
||||
{
|
||||
oldmetal.sprite2 = metal->sprite2;
|
||||
ziptic |= GZT_SPR2;
|
||||
WRITEUINT8(demobuf.p,oldmetal.sprite2);
|
||||
}
|
||||
|
||||
// Check for sprite set changes
|
||||
if (metal->sprite != oldmetal.sprite)
|
||||
{
|
||||
oldmetal.sprite = metal->sprite;
|
||||
ghostext[0].flags |= EZT_SPRITE;
|
||||
}
|
||||
|
||||
if (ghostext[0].flags & ~(EZT_COLOR|EZT_HIT)) // these two aren't handled by metal ever
|
||||
{
|
||||
ziptic |= GZT_EXTRA;
|
||||
|
||||
if (ghostext[0].scale == ghostext[0].lastscale)
|
||||
ghostext[0].flags &= ~EZT_SCALE;
|
||||
|
||||
WRITEUINT8(demobuf.p,ghostext[0].flags);
|
||||
if (ghostext[0].flags & EZT_SCALE)
|
||||
{
|
||||
WRITEFIXED(demobuf.p,ghostext[0].scale);
|
||||
ghostext[0].lastscale = ghostext[0].scale;
|
||||
}
|
||||
if (ghostext[0].flags & EZT_SPRITE)
|
||||
WRITEUINT16(demobuf.p,oldmetal.sprite);
|
||||
ghostext[0].flags = 0;
|
||||
}
|
||||
|
||||
if (metal->player && metal->player->followmobj && !(metal->player->followmobj->sprite == SPR_NULL || (metal->player->followmobj->renderflags & RF_DONTDRAW) == RF_DONTDRAW))
|
||||
{
|
||||
fixed_t temp;
|
||||
UINT8 *followtic_p = demobuf.p++;
|
||||
UINT8 followtic = 0;
|
||||
|
||||
ziptic |= GZT_FOLLOW;
|
||||
|
||||
if (metal->player->followmobj->skin)
|
||||
followtic |= FZT_SKIN;
|
||||
|
||||
if (!(oldmetal.flags2 & MF2_AMBUSH))
|
||||
{
|
||||
followtic |= FZT_SPAWNED;
|
||||
WRITEINT16(demobuf.p,metal->player->followmobj->info->height>>FRACBITS);
|
||||
if (metal->player->followmobj->flags2 & MF2_LINKDRAW)
|
||||
followtic |= FZT_LINKDRAW;
|
||||
if (metal->player->followmobj->colorized)
|
||||
followtic |= FZT_COLORIZED;
|
||||
if (followtic & FZT_SKIN)
|
||||
WRITEUINT8(demobuf.p,(UINT8)(((skin_t *)(metal->player->followmobj->skin))-skins));
|
||||
oldmetal.flags2 |= MF2_AMBUSH;
|
||||
}
|
||||
|
||||
if (metal->player->followmobj->scale != metal->scale)
|
||||
{
|
||||
followtic |= FZT_SCALE;
|
||||
WRITEFIXED(demobuf.p,metal->player->followmobj->scale);
|
||||
}
|
||||
|
||||
temp = metal->player->followmobj->x-metal->x;
|
||||
WRITEFIXED(demobuf.p,temp);
|
||||
temp = metal->player->followmobj->y-metal->y;
|
||||
WRITEFIXED(demobuf.p,temp);
|
||||
temp = metal->player->followmobj->z-metal->z;
|
||||
WRITEFIXED(demobuf.p,temp);
|
||||
if (followtic & FZT_SKIN)
|
||||
WRITEUINT8(demobuf.p,metal->player->followmobj->sprite2);
|
||||
WRITEUINT16(demobuf.p,metal->player->followmobj->sprite);
|
||||
WRITEUINT32(demobuf.p,metal->player->followmobj->frame); // NOT & FF_FRAMEMASK here, so 32 bits
|
||||
WRITEUINT16(demobuf.p,metal->player->followmobj->color);
|
||||
|
||||
*followtic_p = followtic;
|
||||
}
|
||||
else
|
||||
oldmetal.flags2 &= ~MF2_AMBUSH;
|
||||
|
||||
*ziptic_p = ziptic;
|
||||
|
||||
// attention here for the ticcmd size!
|
||||
// latest demos with mouse aiming byte in ticcmd
|
||||
if (demobuf.p >= demobuf.end - 32)
|
||||
{
|
||||
G_StopMetalRecording(false); // no more space
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// G_RecordDemo
|
||||
//
|
||||
|
|
@ -2130,22 +1776,6 @@ void G_RecordDemo(const char *name)
|
|||
demobuf.end -= deadspace;
|
||||
}
|
||||
|
||||
void G_RecordMetal(void)
|
||||
{
|
||||
INT32 maxsize;
|
||||
maxsize = 1024*1024;
|
||||
if (M_CheckParm("-maxdemo") && M_IsNextParm())
|
||||
maxsize = atoi(M_GetNextParm()) * 1024;
|
||||
|
||||
// FIXME: this file doesn't manage its memory and actually free this when it's done using it
|
||||
Z_Free(demobuf.buffer);
|
||||
P_SaveBufferAlloc(&demobuf, maxsize);
|
||||
Z_SetUser(demobuf.buffer, (void**)&demobuf.buffer);
|
||||
demobuf.p = NULL;
|
||||
|
||||
metalrecording = true;
|
||||
}
|
||||
|
||||
static void G_SaveDemoExtraFiles(UINT8 **pp)
|
||||
{
|
||||
char *filename;
|
||||
|
|
@ -2679,39 +2309,6 @@ void G_BeginRecording(void)
|
|||
}
|
||||
}
|
||||
|
||||
void G_BeginMetal(void)
|
||||
{
|
||||
mobj_t *mo = players[consoleplayer].mo;
|
||||
|
||||
#if 0
|
||||
if (demobuf.p)
|
||||
return;
|
||||
#endif
|
||||
|
||||
demobuf.p = demobuf.buffer;
|
||||
|
||||
// Write header.
|
||||
M_Memcpy(demobuf.p, DEMOHEADER, 12); demobuf.p += 12;
|
||||
WRITEUINT8(demobuf.p,VERSION);
|
||||
WRITEUINT8(demobuf.p,SUBVERSION);
|
||||
WRITEUINT16(demobuf.p,DEMOVERSION);
|
||||
|
||||
// demo checksum
|
||||
demobuf.p += 16;
|
||||
|
||||
M_Memcpy(demobuf.p, "METL", 4); demobuf.p += 4;
|
||||
|
||||
memset(&ghostext,0,sizeof(ghostext));
|
||||
ghostext[0].lastscale = ghostext[0].scale = FRACUNIT;
|
||||
|
||||
// Set up our memory.
|
||||
memset(&oldmetal,0,sizeof(oldmetal));
|
||||
oldmetal.x = mo->x;
|
||||
oldmetal.y = mo->y;
|
||||
oldmetal.z = mo->z;
|
||||
oldmetal.angle = mo->angle>>24;
|
||||
}
|
||||
|
||||
void G_WriteStanding(UINT8 ranking, char *name, INT32 skinnum, UINT16 color, UINT32 val)
|
||||
{
|
||||
char temp[16];
|
||||
|
|
@ -4047,72 +3644,6 @@ void G_TimeDemo(const char *name)
|
|||
G_DeferedPlayDemo(name);
|
||||
}
|
||||
|
||||
void G_DoPlayMetal(void)
|
||||
{
|
||||
lumpnum_t l;
|
||||
mobj_t *mo = NULL;
|
||||
thinker_t *th;
|
||||
|
||||
// it's an internal demo
|
||||
// TODO: Use map header to determine lump name
|
||||
if ((l = W_CheckNumForName(va("%sMS",G_BuildMapName(gamemap)))) == LUMPERROR)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No bot recording for this map.\n"));
|
||||
return;
|
||||
}
|
||||
else
|
||||
metalbuffer = metal_p = W_CacheLumpNum(l, PU_STATIC);
|
||||
|
||||
// find metal sonic
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
if (mo->type != MT_METALSONIC_RACE)
|
||||
continue;
|
||||
|
||||
break;
|
||||
}
|
||||
if (th == &thlist[THINK_MOBJ])
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Failed to find bot entity.\n"));
|
||||
Z_Free(metalbuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
// read demo header
|
||||
metal_p += 12; // DEMOHEADER
|
||||
metal_p++; // VERSION
|
||||
metal_p++; // SUBVERSION
|
||||
metalversion = READUINT16(metal_p);
|
||||
switch(metalversion)
|
||||
{
|
||||
case DEMOVERSION: // latest always supported
|
||||
break;
|
||||
// too old, cannot support.
|
||||
default:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Failed to load bot recording for this map, format version incompatible.\n"));
|
||||
Z_Free(metalbuffer);
|
||||
return;
|
||||
}
|
||||
metal_p += 16; // demo checksum
|
||||
if (memcmp(metal_p, "METL", 4))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Failed to load bot recording for this map, wasn't recorded in Metal format.\n"));
|
||||
Z_Free(metalbuffer);
|
||||
return;
|
||||
} metal_p += 4; // "METL"
|
||||
|
||||
// read initial tic
|
||||
memset(&oldmetal,0,sizeof(oldmetal));
|
||||
oldmetal.x = mo->x;
|
||||
oldmetal.y = mo->y;
|
||||
oldmetal.z = mo->z;
|
||||
metalplayback = mo;
|
||||
}
|
||||
|
||||
void G_DoneLevelLoad(void)
|
||||
{
|
||||
CONS_Printf(M_GetText("Loaded level in %f sec\n"), (double)(I_GetTime() - demostarttime) / TICRATE);
|
||||
|
|
@ -4130,6 +3661,7 @@ void G_DoneLevelLoad(void)
|
|||
===================
|
||||
*/
|
||||
|
||||
#if 0 // since it's not actually used anymore, just a reference...
|
||||
// Writes the demo's checksum, or just random garbage if you can't do that for some reason.
|
||||
static void WriteDemoChecksum(void)
|
||||
{
|
||||
|
|
@ -4142,33 +3674,7 @@ static void WriteDemoChecksum(void)
|
|||
md5_buffer((char *)p+16, demobuf.p - (p+16), p); // make a checksum of everything after the checksum in the file.
|
||||
#endif
|
||||
}
|
||||
|
||||
// Stops metal sonic's demo. Separate from other functions because metal + replays can coexist
|
||||
void G_StopMetalDemo(void)
|
||||
{
|
||||
// Metal Sonic finishing doesn't end the game, dammit.
|
||||
Z_Free(metalbuffer);
|
||||
metalbuffer = NULL;
|
||||
metalplayback = NULL;
|
||||
metal_p = NULL;
|
||||
}
|
||||
|
||||
// Stops metal sonic recording.
|
||||
ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(boolean kill)
|
||||
{
|
||||
boolean saved = false;
|
||||
if (demobuf.p)
|
||||
{
|
||||
WRITEUINT8(demobuf.p, (kill) ? METALDEATH : DEMOMARKER); // add the demo end (or metal death) marker
|
||||
WriteDemoChecksum();
|
||||
saved = FIL_WriteFile(va("%sMS.LMP", G_BuildMapName(gamemap)), demobuf.buffer, demobuf.p - demobuf.buffer); // finally output the file.
|
||||
}
|
||||
Z_Free(demobuf.buffer);
|
||||
metalrecording = false;
|
||||
if (saved)
|
||||
I_Error("Saved to %sMS.LMP", G_BuildMapName(gamemap));
|
||||
I_Error("Failed to save demo!");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Stops timing a demo.
|
||||
static void G_StopTimingDemo(void)
|
||||
|
|
@ -4268,8 +3774,6 @@ boolean G_CheckDemoStatus(void)
|
|||
{
|
||||
G_FreeGhosts();
|
||||
|
||||
// DO NOT end metal sonic demos here
|
||||
|
||||
if (demo.timing)
|
||||
{
|
||||
G_StopTimingDemo();
|
||||
|
|
|
|||
13
src/g_demo.h
13
src/g_demo.h
|
|
@ -99,13 +99,9 @@ struct menudemo_t {
|
|||
};
|
||||
|
||||
|
||||
extern mobj_t *metalplayback;
|
||||
|
||||
// Only called by startup code.
|
||||
void G_RecordDemo(const char *name);
|
||||
void G_RecordMetal(void);
|
||||
void G_BeginRecording(void);
|
||||
void G_BeginMetal(void);
|
||||
|
||||
// Only called by shutdown code.
|
||||
void G_WriteStanding(UINT8 ranking, char *name, INT32 skinnum, UINT16 color, UINT32 val);
|
||||
|
|
@ -158,11 +154,6 @@ void G_StoreRewindInfo(void);
|
|||
void G_PreviewRewind(tic_t previewtime);
|
||||
void G_ConfirmRewind(tic_t rewindtime);
|
||||
|
||||
void G_ReadMetalTic(mobj_t *metal);
|
||||
void G_WriteMetalTic(mobj_t *metal);
|
||||
void G_SaveMetal(UINT8 **buffer);
|
||||
void G_LoadMetal(UINT8 **buffer);
|
||||
|
||||
// Your naming conventions are stupid and useless.
|
||||
// There is no conflict here.
|
||||
struct demoghost {
|
||||
|
|
@ -195,10 +186,6 @@ staffbrief_t *G_GetStaffGhostBrief(UINT8 *buffer);
|
|||
void G_FreeGhosts(void);
|
||||
void G_DoneLevelLoad(void);
|
||||
|
||||
void G_DoPlayMetal(void);
|
||||
void G_StopMetalDemo(void);
|
||||
ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(boolean kill);
|
||||
|
||||
void G_StopDemo(void);
|
||||
boolean G_CheckDemoStatus(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -3326,7 +3326,7 @@ void G_AddTOL(UINT32 newtol, const char *tolname)
|
|||
//
|
||||
boolean G_GametypeUsesLives(void)
|
||||
{
|
||||
if (modeattacking || metalrecording) // NOT in Record Attack
|
||||
if (modeattacking) // NOT in Record Attack
|
||||
return false;
|
||||
|
||||
if ((grandprixinfo.gp == true) // In Grand Prix
|
||||
|
|
@ -4346,11 +4346,6 @@ static void G_DoCompleted(void)
|
|||
|
||||
gameaction = ga_nothing;
|
||||
|
||||
if (metalplayback)
|
||||
G_StopMetalDemo();
|
||||
if (metalrecording)
|
||||
G_StopMetalRecording(false);
|
||||
|
||||
if (automapactive)
|
||||
AM_Stop();
|
||||
|
||||
|
|
|
|||
12716
src/info.c
12716
src/info.c
File diff suppressed because it is too large
Load diff
2822
src/info.h
2822
src/info.h
File diff suppressed because it is too large
Load diff
|
|
@ -1028,34 +1028,6 @@ boolean K_FallingRockCollide(mobj_t *t1, mobj_t *t2)
|
|||
return true;
|
||||
}
|
||||
|
||||
boolean K_SMKIceBlockCollide(mobj_t *t1, mobj_t *t2)
|
||||
{
|
||||
if (!(t2->flags & MF_SOLID || t2->flags & MF_SHOOTABLE))
|
||||
return true;
|
||||
|
||||
if (!(t2->health))
|
||||
return true;
|
||||
|
||||
if (t2->type == MT_BANANA || t2->type == MT_BANANA_SHIELD
|
||||
|| t2->type == MT_EGGMANITEM || t2->type == MT_EGGMANITEM_SHIELD
|
||||
|| t2->type == MT_SSMINE || t2->type == MT_SSMINE_SHIELD
|
||||
|| t2->type == MT_DROPTARGET_SHIELD
|
||||
|| t2->type == MT_ORBINAUT_SHIELD || t2->type == MT_JAWZ_SHIELD)
|
||||
return false;
|
||||
|
||||
if (t1->health)
|
||||
P_KillMobj(t1, t2, t2, DMG_NORMAL);
|
||||
|
||||
/*
|
||||
if (t2->player && (t2->player->invincibilitytimer > 0
|
||||
|| K_IsBigger(t2, t1) == true))
|
||||
return true;
|
||||
*/
|
||||
|
||||
K_KartSolidBounce(t1, t2);
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
||||
{
|
||||
if (K_PodiumSequence() == true)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim);
|
|||
boolean K_KitchenSinkCollide(mobj_t *t1, mobj_t *t2);
|
||||
|
||||
boolean K_FallingRockCollide(mobj_t *t1, mobj_t *t2);
|
||||
boolean K_SMKIceBlockCollide(mobj_t *t1, mobj_t *t2);
|
||||
|
||||
boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2);
|
||||
|
||||
|
|
|
|||
|
|
@ -803,7 +803,6 @@ static void OP_CycleThings(INT32 amt)
|
|||
op_currentthing = 0;
|
||||
} while
|
||||
(mobjinfo[op_currentthing].doomednum == -1
|
||||
|| op_currentthing == MT_NIGHTSDRONE
|
||||
|| mobjinfo[op_currentthing].flags & MF_NOSECTOR
|
||||
|| (states[mobjinfo[op_currentthing].spawnstate].sprite == SPR_NULL
|
||||
&& states[mobjinfo[op_currentthing].seestate].sprite == SPR_NULL)
|
||||
|
|
|
|||
|
|
@ -526,8 +526,6 @@ void M_StartTimeAttack(INT32 choice)
|
|||
|
||||
if (demo.playback)
|
||||
G_StopDemo();
|
||||
if (metalrecording)
|
||||
G_StopMetalDemo();
|
||||
|
||||
splitscreen = 0;
|
||||
SplitScreen_OnChange();
|
||||
|
|
|
|||
|
|
@ -720,8 +720,6 @@ void M_LevelSelected(INT16 add, boolean menuupdate)
|
|||
|
||||
if (demo.playback)
|
||||
G_StopDemo();
|
||||
if (metalrecording)
|
||||
G_StopMetalDemo();
|
||||
|
||||
/*if (levellist.choosemap == 0)
|
||||
levellist.choosemap = G_RandMap(G_TOLFlag(levellist.newgametype), -1, 0, 0, false, NULL);*/
|
||||
|
|
|
|||
1229
src/p_enemy.c
1229
src/p_enemy.c
File diff suppressed because it is too large
Load diff
|
|
@ -980,16 +980,6 @@ static mobj_t *SearchMarioNode(msecnode_t *node)
|
|||
case MT_THOK:
|
||||
case MT_GHOST:
|
||||
case MT_OVERLAY:
|
||||
case MT_ELEMENTAL_ORB:
|
||||
case MT_ATTRACT_ORB:
|
||||
case MT_FORCE_ORB:
|
||||
case MT_ARMAGEDDON_ORB:
|
||||
case MT_WHIRLWIND_ORB:
|
||||
case MT_PITY_ORB:
|
||||
case MT_FLAMEAURA_ORB:
|
||||
case MT_BUBBLEWRAP_ORB:
|
||||
case MT_THUNDERCOIN_ORB:
|
||||
case MT_IVSP:
|
||||
case MT_SUPERSPARK:
|
||||
case MT_RAIN:
|
||||
case MT_SNOWFLAKE:
|
||||
|
|
@ -999,18 +989,11 @@ static mobj_t *SearchMarioNode(msecnode_t *node)
|
|||
case MT_SMOKE:
|
||||
case MT_SMALLBUBBLE:
|
||||
case MT_MEDIUMBUBBLE:
|
||||
case MT_TFOG:
|
||||
case MT_SEED:
|
||||
case MT_PARTICLE:
|
||||
case MT_SCORE:
|
||||
case MT_DROWNNUMBERS:
|
||||
case MT_GOTEMERALD:
|
||||
case MT_LOCKON:
|
||||
case MT_TAG:
|
||||
case MT_GOTFLAG:
|
||||
case MT_HOOP:
|
||||
case MT_HOOPCOLLIDE:
|
||||
case MT_NIGHTSCORE:
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
218
src/p_inter.c
218
src/p_inter.c
|
|
@ -385,16 +385,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
// We now identify by object type, not sprite! Tails 04-11-2001
|
||||
switch (special->type)
|
||||
{
|
||||
case MT_MEMENTOSTP: // Mementos teleport
|
||||
// Teleport player to the other teleporter (special->target). We'll assume there's always only ever 2.
|
||||
if (!special->target)
|
||||
return; // foolproof crash prevention check!!!!!
|
||||
|
||||
P_SetOrigin(player->mo, special->target->x, special->target->y, special->target->z + (48<<FRACBITS));
|
||||
player->mo->angle = special->target->angle;
|
||||
P_SetObjectMomZ(player->mo, 12<<FRACBITS, false);
|
||||
P_InstaThrust(player->mo, player->mo->angle, 20<<FRACBITS);
|
||||
return;
|
||||
case MT_FLOATINGITEM: // SRB2Kart
|
||||
if (special->extravalue1 > 0 && toucher != special->tracer)
|
||||
{
|
||||
|
|
@ -581,33 +571,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
special->frame |= FF_TRANS90;
|
||||
return;
|
||||
*/
|
||||
case MT_SMK_MOLE:
|
||||
if (special->target && !P_MobjWasRemoved(special->target))
|
||||
return;
|
||||
|
||||
if (special->health <= 0 || toucher->health <= 0)
|
||||
return;
|
||||
|
||||
if (!player->mo || player->spectator)
|
||||
return;
|
||||
|
||||
// kill
|
||||
if (player->invincibilitytimer > 0
|
||||
|| K_IsBigger(toucher, special) == true
|
||||
|| player->flamedash > 0)
|
||||
{
|
||||
P_KillMobj(special, toucher, toucher, DMG_NORMAL);
|
||||
return;
|
||||
}
|
||||
|
||||
// no interaction
|
||||
if (player->flashing > 0 || player->hyudorotimer > 0 || P_PlayerInPain(player))
|
||||
return;
|
||||
|
||||
// attach to player!
|
||||
P_SetTarget(&special->target, toucher);
|
||||
S_StartSound(special, sfx_s1a2);
|
||||
return;
|
||||
|
||||
case MT_SPECIALSTAGEBOMB:
|
||||
// only attempt to damage the player if they're not invincible
|
||||
|
|
@ -917,11 +880,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
Obj_BungeeSpecial(special, player);
|
||||
return;
|
||||
|
||||
// CTF Flags
|
||||
case MT_REDFLAG:
|
||||
case MT_BLUEFLAG:
|
||||
return;
|
||||
|
||||
case MT_CHEATCHECK:
|
||||
P_TouchCheatcheck(special, player, special->thing_args[1]);
|
||||
return;
|
||||
|
|
@ -1643,8 +1601,6 @@ boolean P_CheckRacers(void)
|
|||
*/
|
||||
void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damagetype)
|
||||
{
|
||||
mobj_t *mo;
|
||||
|
||||
if (target->flags & (MF_ENEMY|MF_BOSS))
|
||||
target->momx = target->momy = target->momz = 0;
|
||||
|
||||
|
|
@ -1733,9 +1689,6 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
// Let EVERYONE know what happened to a player! 01-29-2002 Tails
|
||||
if (target->player && !target->player->spectator)
|
||||
{
|
||||
if (metalrecording) // Ack! Metal Sonic shouldn't die! Cut the tape, end recording!
|
||||
G_StopMetalRecording(true);
|
||||
|
||||
target->renderflags &= ~RF_DONTDRAW;
|
||||
}
|
||||
|
||||
|
|
@ -1822,150 +1775,16 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
// Other death animation effects
|
||||
switch(target->type)
|
||||
{
|
||||
case MT_BOUNCEPICKUP:
|
||||
case MT_RAILPICKUP:
|
||||
case MT_AUTOPICKUP:
|
||||
case MT_EXPLODEPICKUP:
|
||||
case MT_SCATTERPICKUP:
|
||||
case MT_GRENADEPICKUP:
|
||||
P_SetObjectMomZ(target, FRACUNIT, false);
|
||||
target->fuse = target->info->damage;
|
||||
break;
|
||||
|
||||
case MT_BUGGLE:
|
||||
if (inflictor && inflictor->player // did a player kill you? Spawn relative to the player so they're bound to get it
|
||||
&& P_AproxDistance(inflictor->x - target->x, inflictor->y - target->y) <= inflictor->radius + target->radius + FixedMul(8*FRACUNIT, inflictor->scale) // close enough?
|
||||
&& inflictor->z <= target->z + target->height + FixedMul(8*FRACUNIT, inflictor->scale)
|
||||
&& inflictor->z + inflictor->height >= target->z - FixedMul(8*FRACUNIT, inflictor->scale))
|
||||
mo = P_SpawnMobj(inflictor->x + inflictor->momx, inflictor->y + inflictor->momy, inflictor->z + (inflictor->height / 2) + inflictor->momz, MT_EXTRALARGEBUBBLE);
|
||||
else
|
||||
mo = P_SpawnMobj(target->x, target->y, target->z, MT_EXTRALARGEBUBBLE);
|
||||
mo->destscale = target->scale;
|
||||
P_SetScale(mo, mo->destscale);
|
||||
P_SetMobjState(mo, mo->info->raisestate);
|
||||
break;
|
||||
|
||||
case MT_YELLOWSHELL:
|
||||
P_SpawnMobjFromMobj(target, 0, 0, 0, MT_YELLOWSPRING);
|
||||
break;
|
||||
|
||||
case MT_CRAWLACOMMANDER:
|
||||
target->momx = target->momy = target->momz = 0;
|
||||
break;
|
||||
|
||||
case MT_CRUSHSTACEAN:
|
||||
if (target->tracer)
|
||||
{
|
||||
mobj_t *chain = target->tracer->target, *chainnext;
|
||||
while (chain)
|
||||
{
|
||||
chainnext = chain->target;
|
||||
P_RemoveMobj(chain);
|
||||
chain = chainnext;
|
||||
}
|
||||
S_StopSound(target->tracer);
|
||||
P_KillMobj(target->tracer, inflictor, source, damagetype);
|
||||
}
|
||||
break;
|
||||
|
||||
case MT_BANPYURA:
|
||||
if (target->tracer)
|
||||
{
|
||||
S_StopSound(target->tracer);
|
||||
P_KillMobj(target->tracer, inflictor, source, damagetype);
|
||||
}
|
||||
break;
|
||||
|
||||
case MT_EGGSHIELD:
|
||||
P_SetObjectMomZ(target, 4*target->scale, false);
|
||||
P_InstaThrust(target, target->angle, 3*target->scale);
|
||||
target->flags = (target->flags|MF_NOCLIPHEIGHT) & ~MF_NOGRAVITY;
|
||||
break;
|
||||
|
||||
case MT_DRAGONBOMBER:
|
||||
{
|
||||
mobj_t *segment = target;
|
||||
while (segment->tracer != NULL)
|
||||
{
|
||||
P_KillMobj(segment->tracer, NULL, NULL, DMG_NORMAL);
|
||||
segment = segment->tracer;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case MT_EGGMOBILE3:
|
||||
{
|
||||
mobj_t *mo2;
|
||||
thinker_t *th;
|
||||
UINT32 i = 0; // to check how many clones we've removed
|
||||
|
||||
// scan the thinkers to make sure all the old pinch dummies are gone on death
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
if (mo->type != (mobjtype_t)target->info->mass)
|
||||
continue;
|
||||
if (mo->tracer != target)
|
||||
continue;
|
||||
|
||||
P_KillMobj(mo, inflictor, source, damagetype);
|
||||
mo->destscale = mo->scale/8;
|
||||
mo->scalespeed = (mo->scale - mo->destscale)/(2*TICRATE);
|
||||
mo->momz = mo->info->speed;
|
||||
mo->angle = FixedAngle((P_RandomKey(PR_UNDEFINED, 36)*10)<<FRACBITS);
|
||||
|
||||
mo2 = P_SpawnMobjFromMobj(mo, 0, 0, 0, MT_BOSSJUNK);
|
||||
mo2->angle = mo->angle;
|
||||
P_SetMobjState(mo2, S_BOSSSEBH2);
|
||||
|
||||
if (++i == 2) // we've already removed 2 of these, let's stop now
|
||||
break;
|
||||
else
|
||||
S_StartSound(mo, mo->info->deathsound); // done once to prevent sound stacking
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case MT_BIGMINE:
|
||||
if (inflictor)
|
||||
{
|
||||
fixed_t dx = target->x - inflictor->x, dy = target->y - inflictor->y, dz = target->z - inflictor->z;
|
||||
fixed_t dm = FixedHypot(dz, FixedHypot(dy, dx));
|
||||
target->momx = FixedDiv(FixedDiv(dx, dm), dm)*512;
|
||||
target->momy = FixedDiv(FixedDiv(dy, dm), dm)*512;
|
||||
target->momz = FixedDiv(FixedDiv(dz, dm), dm)*512;
|
||||
}
|
||||
if (source)
|
||||
P_SetTarget(&target->tracer, source);
|
||||
break;
|
||||
|
||||
case MT_BLASTEXECUTOR:
|
||||
if (target->spawnpoint)
|
||||
P_LinedefExecute(target->spawnpoint->angle, (source ? source : inflictor), target->subsector->sector);
|
||||
break;
|
||||
|
||||
case MT_SPINBOBERT:
|
||||
if (target->hnext)
|
||||
P_KillMobj(target->hnext, inflictor, source, damagetype);
|
||||
if (target->hprev)
|
||||
P_KillMobj(target->hprev, inflictor, source, damagetype);
|
||||
break;
|
||||
|
||||
case MT_EGGTRAP:
|
||||
// Time for birdies! Yaaaaaaaay!
|
||||
target->fuse = TICRATE;
|
||||
break;
|
||||
|
||||
case MT_MINECART:
|
||||
A_Scream(target);
|
||||
target->momx = target->momy = target->momz = 0;
|
||||
if (target->target && target->target->health)
|
||||
P_KillMobj(target->target, target, source, DMG_NORMAL);
|
||||
break;
|
||||
|
||||
case MT_PLAYER:
|
||||
if (damagetype != DMG_SPECTATOR)
|
||||
{
|
||||
|
|
@ -2064,26 +1883,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
target->tics = 175;
|
||||
return;
|
||||
|
||||
case MT_METALSONIC_RACE:
|
||||
target->fuse = TICRATE*3;
|
||||
target->momx = target->momy = target->momz = 0;
|
||||
P_SetObjectMomZ(target, 14*FRACUNIT, false);
|
||||
target->flags = (target->flags & ~MF_NOGRAVITY)|(MF_NOCLIP|MF_NOCLIPTHING);
|
||||
break;
|
||||
|
||||
// SRB2Kart:
|
||||
case MT_SMK_ICEBLOCK:
|
||||
{
|
||||
mobj_t *cur = target->hnext;
|
||||
while (cur && !P_MobjWasRemoved(cur))
|
||||
{
|
||||
P_SetMobjState(cur, S_SMK_ICEBLOCK2);
|
||||
cur = cur->hnext;
|
||||
}
|
||||
target->fuse = 10;
|
||||
S_StartSound(target, sfx_s3k80);
|
||||
}
|
||||
break;
|
||||
|
||||
case MT_ITEMCAPSULE:
|
||||
{
|
||||
|
|
@ -2439,23 +2239,6 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
}
|
||||
}
|
||||
|
||||
// Bounce up on death
|
||||
if (target->type == MT_SMK_PIPE || target->type == MT_SMK_MOLE || target->type == MT_SMK_THWOMP)
|
||||
{
|
||||
target->flags &= (~MF_NOGRAVITY);
|
||||
|
||||
if (target->eflags & MFE_VERTICALFLIP)
|
||||
target->z -= target->height;
|
||||
else
|
||||
target->z += target->height;
|
||||
|
||||
S_StartSound(target, target->info->deathsound);
|
||||
|
||||
P_SetObjectMomZ(target, 8<<FRACBITS, false);
|
||||
if (inflictor)
|
||||
P_InstaThrust(target, R_PointToAngle2(inflictor->x, inflictor->y, target->x, target->y)+ANGLE_90, 16<<FRACBITS);
|
||||
}
|
||||
|
||||
// Final state setting - do something instead of P_SetMobjState;
|
||||
if (target->type == MT_SPIKE && target->info->deathstate != S_NULL)
|
||||
{
|
||||
|
|
@ -2955,7 +2738,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
}
|
||||
|
||||
// Everything above here can't be forced.
|
||||
if (!metalrecording)
|
||||
{
|
||||
UINT8 shouldForce = LUA_HookShouldDamage(target, inflictor, source, damage, damagetype);
|
||||
if (P_MobjWasRemoved(target))
|
||||
|
|
|
|||
|
|
@ -184,8 +184,6 @@ INT32 P_GivePlayerRings(player_t *player, INT32 num_rings);
|
|||
INT32 P_GivePlayerSpheres(player_t *player, INT32 num_spheres);
|
||||
void P_GivePlayerLives(player_t *player, INT32 numlives);
|
||||
UINT8 P_GetNextEmerald(void);
|
||||
void P_GiveEmerald(boolean spawnObj);
|
||||
void P_GiveFinishFlags(player_t *player);
|
||||
boolean P_AutoPause(void);
|
||||
|
||||
void P_ElementalFire(player_t *player, boolean cropcircle);
|
||||
|
|
|
|||
156
src/p_map.c
156
src/p_map.c
|
|
@ -486,18 +486,6 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object)
|
|||
|
||||
switch (spring->type)
|
||||
{
|
||||
case MT_FAN: // fan
|
||||
if (zdist > (spring->health << FRACBITS)) // max z distance determined by health (set by map thing args[0])
|
||||
break;
|
||||
if (flipval*object->momz >= FixedMul(speed, spring->scale)) // if object's already moving faster than your best, don't bother
|
||||
break;
|
||||
|
||||
object->momz += flipval*FixedMul(speed/4, spring->scale);
|
||||
|
||||
// limit the speed if too high
|
||||
if (flipval*object->momz > FixedMul(speed, spring->scale))
|
||||
object->momz = flipval*FixedMul(speed, spring->scale);
|
||||
break;
|
||||
case MT_STEAM: // Steam
|
||||
if (zdist > FixedMul(16*FRACUNIT, spring->scale))
|
||||
break;
|
||||
|
|
@ -948,27 +936,6 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
return Obj_ShrinkLaserCollide(tm.thing, thing) ? BMIT_CONTINUE : BMIT_ABORT;
|
||||
}
|
||||
|
||||
if (tm.thing->type == MT_SMK_ICEBLOCK)
|
||||
{
|
||||
// see if it went over / under
|
||||
if (tm.thing->z > thing->z + thing->height)
|
||||
return BMIT_CONTINUE; // overhead
|
||||
if (tm.thing->z + tm.thing->height < thing->z)
|
||||
return BMIT_CONTINUE; // underneath
|
||||
|
||||
return K_SMKIceBlockCollide(tm.thing, thing) ? BMIT_CONTINUE : BMIT_ABORT;
|
||||
}
|
||||
else if (thing->type == MT_SMK_ICEBLOCK)
|
||||
{
|
||||
// see if it went over / under
|
||||
if (tm.thing->z > thing->z + thing->height)
|
||||
return BMIT_CONTINUE; // overhead
|
||||
if (tm.thing->z + tm.thing->height < thing->z)
|
||||
return BMIT_CONTINUE; // underneath
|
||||
|
||||
return K_SMKIceBlockCollide(thing, tm.thing) ? BMIT_CONTINUE : BMIT_ABORT;
|
||||
}
|
||||
|
||||
if (tm.thing->type == MT_EGGMANITEM || tm.thing->type == MT_EGGMANITEM_SHIELD)
|
||||
{
|
||||
// see if it went over / under
|
||||
|
|
@ -1224,25 +1191,6 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
return BMIT_CONTINUE;
|
||||
}
|
||||
|
||||
if ((thing->type == MT_SPRINGSHELL || thing->type == MT_YELLOWSHELL) && thing->health > 0
|
||||
&& (tm.thing->player || (tm.thing->flags & MF_PUSHABLE)) && tm.thing->health > 0)
|
||||
{
|
||||
// Multiplying by -1 inherently flips "less than" and "greater than"
|
||||
fixed_t tmz = ((thing->eflags & MFE_VERTICALFLIP) ? -(tm.thing->z + tm.thing->height) : tm.thing->z);
|
||||
fixed_t tmznext = ((thing->eflags & MFE_VERTICALFLIP) ? -tm.thing->momz : tm.thing->momz) + tmz;
|
||||
fixed_t thzh = ((thing->eflags & MFE_VERTICALFLIP) ? -thing->z : thing->z + thing->height);
|
||||
//fixed_t sprarea = FixedMul(8*FRACUNIT, thing->scale) * P_MobjFlip(thing);
|
||||
|
||||
//if ((tmznext <= thzh && tmz > thzh) || (tmznext > thzh - sprarea && tmznext < thzh))
|
||||
if (tmznext <= thzh)
|
||||
{
|
||||
P_DoSpring(thing, tm.thing);
|
||||
// return BMIT_CONTINUE;
|
||||
}
|
||||
//else if (tmz > thzh - sprarea && tmz < thzh) // Don't damage people springing up / down
|
||||
return BMIT_CONTINUE;
|
||||
}
|
||||
|
||||
// missiles can hit other things
|
||||
if ((tm.thing->flags & MF_MISSILE) && !damage) // if something was already damaged, don't run this
|
||||
{
|
||||
|
|
@ -1419,13 +1367,13 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
if (thing->flags & MF_PUSHABLE)
|
||||
{
|
||||
if (tm.thing->type == MT_FAN || tm.thing->type == MT_STEAM)
|
||||
if (tm.thing->type == MT_STEAM)
|
||||
P_DoFanAndGasJet(tm.thing, thing);
|
||||
}
|
||||
|
||||
if (tm.thing->flags & MF_PUSHABLE)
|
||||
{
|
||||
if (thing->type == MT_FAN || thing->type == MT_STEAM)
|
||||
if (thing->type == MT_STEAM)
|
||||
{
|
||||
P_DoFanAndGasJet(thing, tm.thing);
|
||||
return BMIT_CONTINUE;
|
||||
|
|
@ -1450,7 +1398,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
if (thing->player)
|
||||
{
|
||||
if (tm.thing->type == MT_FAN || tm.thing->type == MT_STEAM)
|
||||
if (tm.thing->type == MT_STEAM)
|
||||
P_DoFanAndGasJet(tm.thing, thing);
|
||||
}
|
||||
|
||||
|
|
@ -1459,7 +1407,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
if (!tm.thing->health)
|
||||
return BMIT_CONTINUE;
|
||||
|
||||
if (thing->type == MT_FAN || thing->type == MT_STEAM)
|
||||
if (thing->type == MT_STEAM)
|
||||
P_DoFanAndGasJet(thing, tm.thing);
|
||||
else if (thing->flags & MF_SPRING)
|
||||
{
|
||||
|
|
@ -1544,72 +1492,6 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
return BMIT_CONTINUE;
|
||||
}
|
||||
}
|
||||
else if (thing->type == MT_SMK_PIPE)
|
||||
{
|
||||
// see if it went over / under
|
||||
if (tm.thing->z > thing->z + thing->height)
|
||||
return BMIT_CONTINUE; // overhead
|
||||
if (tm.thing->z + tm.thing->height < thing->z)
|
||||
return BMIT_CONTINUE; // underneath
|
||||
|
||||
if (!thing->health)
|
||||
return BMIT_CONTINUE; // dead
|
||||
|
||||
if (tm.thing->player->invincibilitytimer > 0
|
||||
|| K_IsBigger(tm.thing, thing) == true)
|
||||
{
|
||||
P_KillMobj(thing, tm.thing, tm.thing, DMG_NORMAL);
|
||||
return BMIT_CONTINUE; // kill
|
||||
}
|
||||
|
||||
K_KartSolidBounce(tm.thing, thing);
|
||||
return BMIT_CONTINUE;
|
||||
}
|
||||
else if (thing->type == MT_SMK_THWOMP)
|
||||
{
|
||||
if (!thing->health)
|
||||
return BMIT_CONTINUE; // dead
|
||||
|
||||
if (!thwompsactive)
|
||||
return BMIT_CONTINUE; // not active yet
|
||||
|
||||
if ((tm.thing->z < thing->z) && (thing->z >= thing->movefactor-(256<<FRACBITS)))
|
||||
{
|
||||
thing->extravalue1 = 1; // purposely try to stomp on players early
|
||||
//S_StartSound(thing, sfx_s1bb);
|
||||
}
|
||||
|
||||
// see if it went over / under
|
||||
if (tm.thing->z > thing->z + thing->height)
|
||||
return BMIT_CONTINUE; // overhead
|
||||
if (tm.thing->z + tm.thing->height < thing->z)
|
||||
return BMIT_CONTINUE; // underneath
|
||||
|
||||
// kill
|
||||
if (tm.thing->player->invincibilitytimer > 0
|
||||
|| K_IsBigger(tm.thing, thing) == true)
|
||||
{
|
||||
P_KillMobj(thing, tm.thing, tm.thing, DMG_NORMAL);
|
||||
return BMIT_CONTINUE;
|
||||
}
|
||||
|
||||
// no interaction
|
||||
if (tm.thing->player->flashing > 0 || tm.thing->player->hyudorotimer > 0 || tm.thing->player->spinouttimer > 0)
|
||||
return BMIT_CONTINUE;
|
||||
|
||||
// collide
|
||||
if (tm.thing->z < thing->z && thing->momz < 0)
|
||||
P_DamageMobj(tm.thing, thing, thing, 1, DMG_TUMBLE);
|
||||
else
|
||||
{
|
||||
if ((K_KartSolidBounce(tm.thing, thing) == true) && (thing->flags2 & MF2_AMBUSH))
|
||||
{
|
||||
P_DamageMobj(tm.thing, thing, thing, 1, DMG_WIPEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
return BMIT_CONTINUE;
|
||||
}
|
||||
else if (thing->type == MT_KART_LEFTOVER)
|
||||
{
|
||||
// see if it went over / under
|
||||
|
|
@ -2252,8 +2134,6 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re
|
|||
|
||||
if (P_CheckSolidFFloorSurface(thing, rover))
|
||||
;
|
||||
else if (thing->type == MT_SKIM && (rover->fofflags & FOF_SWIMMABLE))
|
||||
;
|
||||
else if (!((rover->fofflags & FOF_BLOCKPLAYER && thing->player)
|
||||
|| (rover->fofflags & FOF_BLOCKOTHERS && !thing->player)
|
||||
|| rover->fofflags & FOF_QUICKSAND))
|
||||
|
|
@ -2290,8 +2170,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re
|
|||
}
|
||||
|
||||
if (bottomheight < tm.ceilingz && abs(delta1) >= abs(delta2)
|
||||
&& !(rover->fofflags & FOF_PLATFORM)
|
||||
&& !(thing->type == MT_SKIM && (rover->fofflags & FOF_SWIMMABLE)))
|
||||
&& !(rover->fofflags & FOF_PLATFORM))
|
||||
{
|
||||
tm.ceilingz = tm.drpoffceilz = bottomheight;
|
||||
tm.ceilingrover = rover;
|
||||
|
|
@ -3056,7 +2935,7 @@ increment_move
|
|||
}
|
||||
}
|
||||
|
||||
if (!allowdropoff && !(thing->flags & MF_FLOAT) && thing->type != MT_SKIM && !tm.floorthing)
|
||||
if (!allowdropoff && !(thing->flags & MF_FLOAT) && !tm.floorthing)
|
||||
{
|
||||
if (thing->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
|
|
@ -4229,27 +4108,8 @@ void P_BounceMove(mobj_t *mo, TryMoveResult_t *result)
|
|||
if (bestslideline == NULL)
|
||||
return;
|
||||
|
||||
if (mo->type == MT_SHELL)
|
||||
{
|
||||
tmxmove = mmomx;
|
||||
tmymove = mmomy;
|
||||
}
|
||||
else if (mo->type == MT_THROWNBOUNCE)
|
||||
{
|
||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>6) - (FRACUNIT>>5)));
|
||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>6) - (FRACUNIT>>5)));
|
||||
}
|
||||
else if (mo->type == MT_THROWNGRENADE)
|
||||
{
|
||||
// Quickly decay speed as it bounces
|
||||
tmxmove = FixedDiv(mmomx, 2*FRACUNIT);
|
||||
tmymove = FixedDiv(mmomy, 2*FRACUNIT);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
}
|
||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
|
||||
P_HitBounceLine(bestslideline); // clip the moves
|
||||
|
||||
|
|
|
|||
788
src/p_mobj.c
788
src/p_mobj.c
File diff suppressed because it is too large
Load diff
|
|
@ -5958,14 +5958,6 @@ static inline void P_NetArchiveSpecials(savebuffer_t *save)
|
|||
// Current global weather type
|
||||
WRITEUINT8(save->p, globalweather);
|
||||
|
||||
if (metalplayback) // Is metal sonic running?
|
||||
{
|
||||
WRITEUINT8(save->p, 0x01);
|
||||
G_SaveMetal(&save->p);
|
||||
}
|
||||
else
|
||||
WRITEUINT8(save->p, 0x00);
|
||||
|
||||
TracyCZoneEnd(__zone);
|
||||
}
|
||||
|
||||
|
|
@ -6006,9 +5998,6 @@ static void P_NetUnArchiveSpecials(savebuffer_t *save)
|
|||
P_SwitchWeather(globalweather);
|
||||
}
|
||||
|
||||
if (READUINT8(save->p) == 0x01) // metal sonic
|
||||
G_LoadMetal(&save->p);
|
||||
|
||||
TracyCZoneEnd(__zone);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8247,9 +8247,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
// Initialize sector node list.
|
||||
P_Initsecnode();
|
||||
|
||||
if (metalplayback)
|
||||
G_StopMetalDemo();
|
||||
|
||||
// Clear CECHO messages
|
||||
HU_ClearCEcho();
|
||||
HU_ClearTitlecardCEcho();
|
||||
|
|
@ -8757,8 +8754,6 @@ void P_PostLoadLevel(void)
|
|||
|
||||
P_InitPlayers();
|
||||
|
||||
if (metalrecording)
|
||||
G_BeginMetal();
|
||||
if (demo.recording) // Okay, level loaded, character spawned and skinned,
|
||||
G_BeginRecording(); // I AM NOW READY TO RECORD.
|
||||
demo.deferstart = true;
|
||||
|
|
|
|||
13
src/p_spec.c
13
src/p_spec.c
|
|
@ -3421,11 +3421,6 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
}
|
||||
break;
|
||||
|
||||
case 440: // Play race countdown and start Metal Sonic
|
||||
if (!metalrecording && !metalplayback)
|
||||
G_DoPlayMetal();
|
||||
break;
|
||||
|
||||
case 441: // Trigger unlockable
|
||||
{
|
||||
INT32 trigid = args[0];
|
||||
|
|
@ -5290,10 +5285,10 @@ static void P_EvaluateSpecialFlags(player_t *player, sector_t *sector, sector_t
|
|||
P_ProcessExitSector(player, sectag);
|
||||
if (sector->specialflags & SSF_FAN)
|
||||
{
|
||||
player->mo->momz += mobjinfo[MT_FAN].mass/4;
|
||||
player->mo->momz += (5*FRACUNIT)/4;
|
||||
|
||||
if (player->mo->momz > mobjinfo[MT_FAN].mass)
|
||||
player->mo->momz = mobjinfo[MT_FAN].mass;
|
||||
if (player->mo->momz > (5*FRACUNIT))
|
||||
player->mo->momz = (5*FRACUNIT);
|
||||
|
||||
P_ResetPlayer(player);
|
||||
/*
|
||||
|
|
@ -6647,8 +6642,6 @@ void T_LaserFlash(laserthink_t *flash)
|
|||
|
||||
if (thing->flags & MF_SHOOTABLE)
|
||||
P_DamageMobj(thing, NULL, NULL, 1, DMG_NORMAL);
|
||||
else if (thing->type == MT_EGGSHIELD)
|
||||
P_KillMobj(thing, NULL, NULL, DMG_NORMAL);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1162,11 +1162,6 @@ void P_Ticker(boolean run)
|
|||
quake = quake->next;
|
||||
}
|
||||
|
||||
if (metalplayback)
|
||||
G_ReadMetalTic(metalplayback);
|
||||
if (metalrecording)
|
||||
G_WriteMetalTic(players[consoleplayer].mo);
|
||||
|
||||
if (demo.recording)
|
||||
{
|
||||
G_WriteAllGhostTics();
|
||||
|
|
|
|||
86
src/p_user.c
86
src/p_user.c
|
|
@ -318,89 +318,6 @@ UINT8 P_GetNextEmerald(void)
|
|||
return cup->emeraldnum;
|
||||
}
|
||||
|
||||
//
|
||||
// P_GiveEmerald
|
||||
//
|
||||
// Award an emerald upon completion
|
||||
// of a special stage.
|
||||
//
|
||||
void P_GiveEmerald(boolean spawnObj)
|
||||
{
|
||||
UINT8 em = P_GetNextEmerald();
|
||||
|
||||
S_StartSound(NULL, sfx_cgot); // Got the emerald!
|
||||
stagefailed = false;
|
||||
|
||||
if (spawnObj)
|
||||
{
|
||||
// The Chaos Emerald begins to orbit us!
|
||||
// Only visibly give it to ONE person!
|
||||
UINT8 i, pnum = ((playeringame[consoleplayer]) && (!players[consoleplayer].spectator) && (players[consoleplayer].mo)) ? consoleplayer : 255;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
mobj_t *emmo;
|
||||
if (!playeringame[i])
|
||||
continue;
|
||||
if (players[i].spectator)
|
||||
continue;
|
||||
if (!players[i].mo)
|
||||
continue;
|
||||
|
||||
emmo = P_SpawnMobjFromMobj(players[i].mo, 0, 0, players[i].mo->height, MT_GOTEMERALD);
|
||||
if (!emmo)
|
||||
continue;
|
||||
P_SetTarget(&emmo->target, players[i].mo);
|
||||
P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em);
|
||||
|
||||
// Make sure we're not being carried before our tracer is changed
|
||||
players[i].carry = CR_NONE;
|
||||
|
||||
P_SetTarget(&players[i].mo->tracer, emmo);
|
||||
|
||||
if (pnum == 255)
|
||||
{
|
||||
pnum = i;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i == pnum)
|
||||
continue;
|
||||
|
||||
emmo->flags2 |= RF_DONTDRAW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// P_GiveFinishFlags
|
||||
//
|
||||
// Give the player visual indicators
|
||||
// that they've finished the map.
|
||||
//
|
||||
void P_GiveFinishFlags(player_t *player)
|
||||
{
|
||||
angle_t angle = FixedAngle(player->mo->angle << FRACBITS);
|
||||
UINT8 i;
|
||||
|
||||
if (!player->mo)
|
||||
return;
|
||||
|
||||
if (!(netgame||multiplayer))
|
||||
return;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
angle_t fa = (angle >> ANGLETOFINESHIFT) & FINEMASK;
|
||||
fixed_t xoffs = FINECOSINE(fa);
|
||||
fixed_t yoffs = FINESINE(fa);
|
||||
mobj_t* flag = P_SpawnMobjFromMobj(player->mo, xoffs, yoffs, 0, MT_FINISHFLAG);
|
||||
flag->angle = angle;
|
||||
angle += FixedAngle(120*FRACUNIT);
|
||||
|
||||
P_SetTarget(&flag->target, player->mo);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// P_FindLowestLap
|
||||
//
|
||||
|
|
@ -1623,9 +1540,6 @@ static void P_CheckBustableBlocks(player_t *player)
|
|||
player->mo->momy >>= 1;
|
||||
}
|
||||
|
||||
//if (metalrecording)
|
||||
// G_RecordBustup(rover);
|
||||
|
||||
EV_CrumbleChain(NULL, rover); // node->m_sector
|
||||
|
||||
// Run a linedef executor??
|
||||
|
|
|
|||
|
|
@ -1653,8 +1653,6 @@ void I_Quit(void)
|
|||
|
||||
if (demo.recording)
|
||||
G_CheckDemoStatus();
|
||||
if (metalrecording)
|
||||
G_StopMetalRecording(false);
|
||||
|
||||
#ifdef DEVELOP
|
||||
// Join up with thread if waiting
|
||||
|
|
@ -1787,8 +1785,6 @@ void I_Error(const char *error, ...)
|
|||
#ifndef TESTERS
|
||||
if (demo.recording)
|
||||
G_CheckDemoStatus();
|
||||
if (metalrecording)
|
||||
G_StopMetalRecording(false);
|
||||
#endif
|
||||
|
||||
D_QuitNetGame();
|
||||
|
|
|
|||
|
|
@ -2992,8 +2992,6 @@ void I_Quit(void)
|
|||
|
||||
if (demorecording)
|
||||
G_CheckDemoStatus();
|
||||
if (metalrecording)
|
||||
G_StopMetalRecording();
|
||||
|
||||
D_QuitNetGame();
|
||||
I_ShutdownMusic();
|
||||
|
|
@ -3149,8 +3147,6 @@ void I_Error(const char *error, ...)
|
|||
// Shutdown. Here might be other errors.
|
||||
if (demorecording)
|
||||
G_CheckDemoStatus();
|
||||
if (metalrecording)
|
||||
G_StopMetalRecording();
|
||||
|
||||
D_QuitNetGame();
|
||||
I_ShutdownMusic();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue