[PATCH] Compat changes
This commit is contained in:
parent
e550ae380e
commit
f77e310c5e
4 changed files with 55 additions and 50 deletions
|
|
@ -49,7 +49,7 @@ void T_MoveCeiling(ceiling_t *ceiling)
|
|||
const fixed_t origspeed = FixedDiv(ceiling->origspeed, (ELEVATORSPEED/2));
|
||||
fixed_t fs;
|
||||
fixed_t bs;
|
||||
|
||||
|
||||
if (udmf)
|
||||
{
|
||||
fs = abs(ceiling->sector->ceilingheight - ceiling->crushHeight);
|
||||
|
|
@ -60,7 +60,7 @@ void T_MoveCeiling(ceiling_t *ceiling)
|
|||
fs = abs(ceiling->sector->ceilingheight - lines[ceiling->sourceline].frontsector->ceilingheight);
|
||||
bs = abs(ceiling->sector->ceilingheight - lines[ceiling->sourceline].backsector->ceilingheight);
|
||||
}
|
||||
|
||||
|
||||
if (fs < bs)
|
||||
ceiling->speed = FixedDiv(fs, 25*FRACUNIT) + FRACUNIT/4;
|
||||
else
|
||||
|
|
@ -243,7 +243,7 @@ INT32 EV_DoCeiling(mtag_t tag, line_t *line, ceiling_e type)
|
|||
{
|
||||
// This function is deprecated.
|
||||
// Use any of the following functions directly, instead.
|
||||
|
||||
|
||||
if (mapnamespace == MNS_SRB2KART)
|
||||
{
|
||||
return EV_DoCeilingOLD(tag,line,type);
|
||||
|
|
@ -365,11 +365,21 @@ INT32 EV_DoCeilingOLD(mtag_t tag, line_t *line, ceiling_e type)
|
|||
// chained linedef executing ability
|
||||
// only set it on ONE of the moving sectors (the smallest numbered)
|
||||
// only set it if there isn't also a floor mover
|
||||
if (line->args[3] && line->args[1] == 1)
|
||||
ceiling->tag = firstone ? (INT16)line->args[3] : 0;
|
||||
//if (line->args[3] && line->args[1] == 1)
|
||||
//ceiling->tag = firstone ? (INT16)line->args[3] : 0;
|
||||
|
||||
// chained linedef executing ability
|
||||
// only set it on ONE of the moving sectors (the smallest numbered)
|
||||
// and front side x offset must be positive
|
||||
if (line->args[4])
|
||||
{
|
||||
ceiling->texture = firstone ? line->args[4] - 32769 : -1;
|
||||
}
|
||||
else if (line->args[3]) // flat changing ability
|
||||
ceiling->texture = line->frontsector->ceilingpic;
|
||||
else
|
||||
ceiling->texture = -1;
|
||||
|
||||
// flat changing ability
|
||||
ceiling->texture = line->args[4] ? line->frontsector->ceilingpic : -1;
|
||||
break;
|
||||
|
||||
// More linedef executor junk
|
||||
|
|
@ -744,7 +754,7 @@ INT32 EV_DoCrush(mtag_t tag, line_t *line, ceiling_e type)
|
|||
// Use any of the following functions directly, instead.
|
||||
|
||||
fixed_t speed = line->args[2] << (FRACBITS - 2);
|
||||
|
||||
|
||||
if (mapnamespace == MNS_SRB2KART)
|
||||
{
|
||||
return EV_DoCrushOLD(tag,line,type);
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ void T_MoveFloor(floormove_t *movefloor)
|
|||
const fixed_t origspeed = FixedDiv(movefloor->origspeed,(ELEVATORSPEED/2));
|
||||
fixed_t fs;
|
||||
fixed_t bs;
|
||||
|
||||
|
||||
if (udmf)
|
||||
{
|
||||
fs = abs(movefloor->sector->floorheight - movefloor->crushHeight);
|
||||
|
|
@ -193,7 +193,7 @@ void T_MoveFloor(floormove_t *movefloor)
|
|||
fs = abs(movefloor->sector->floorheight - lines[movefloor->sourceline].frontsector->floorheight);
|
||||
bs = abs(movefloor->sector->floorheight - lines[movefloor->sourceline].backsector->floorheight);
|
||||
}
|
||||
|
||||
|
||||
if (fs < bs)
|
||||
movefloor->speed = FixedDiv(fs,25*FRACUNIT) + FRACUNIT/4;
|
||||
else
|
||||
|
|
@ -243,7 +243,7 @@ void T_MoveFloor(floormove_t *movefloor)
|
|||
movefloor->origspeed = lines[movefloor->sourceline].args[2] << (FRACBITS - 2); // forward again, use args[2]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (movefloor->type == bounceFloorCrush)
|
||||
movefloor->speed = movefloor->origspeed;
|
||||
movefloor->direction = (movefloor->floordestheight < movefloor->sector->floorheight) ? -1 : 1;
|
||||
|
|
@ -257,7 +257,7 @@ void T_MoveFloor(floormove_t *movefloor)
|
|||
movefloor->floordestheight = movefloor->crushHeight;
|
||||
else
|
||||
movefloor->floordestheight = lines[movefloor->sourceline].frontsector->floorheight;
|
||||
|
||||
|
||||
movefloor->direction = -1;
|
||||
if (udmf)
|
||||
movefloor->speed = movefloor->returnSpeed;
|
||||
|
|
@ -1595,13 +1595,12 @@ void EV_DoFloor(mtag_t tag, line_t *line, floor_e floortype)
|
|||
{
|
||||
// This function is deprecated.
|
||||
// Use any of the following functions directly, instead.
|
||||
|
||||
|
||||
if (mapnamespace == MNS_SRB2KART)
|
||||
{
|
||||
EV_DoFloorOLD(tag, line, floortype);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch (floortype)
|
||||
{
|
||||
|
|
@ -1723,7 +1722,7 @@ void EV_DoFloorOLD(mtag_t tag, line_t *line, floor_e floortype)
|
|||
dofloor->direction = -1; // down
|
||||
|
||||
// If flag is set, change floor texture after moving
|
||||
dofloor->texture = line->args[2] ? line->frontsector->floorpic : -1;
|
||||
dofloor->texture = line->args[3] ? line->frontsector->floorpic : -1;
|
||||
break;
|
||||
|
||||
case moveFloorByFrontSector:
|
||||
|
|
|
|||
|
|
@ -7885,7 +7885,6 @@ static void P_InitLevelSettings(boolean reloadinggamestate)
|
|||
chainingactive = false;
|
||||
slipdashactive = false;
|
||||
|
||||
|
||||
if (cv_kartrings.value)
|
||||
ringsactive = true;
|
||||
|
||||
|
|
@ -7937,7 +7936,7 @@ static void P_InitLevelSettings(boolean reloadinggamestate)
|
|||
|
||||
racecountdown = exitcountdown = exitfadestarted = 0;
|
||||
curlap = bestlap = 0; // SRB2Kart
|
||||
|
||||
|
||||
g_exit.losing = false;
|
||||
g_exit.retry = false;
|
||||
|
||||
|
|
@ -8209,7 +8208,7 @@ static void P_InitPlayers(void)
|
|||
continue;
|
||||
|
||||
players[i].spectatorreentry = 0; // SRB2Kart 1.4
|
||||
|
||||
|
||||
players[i].mo = NULL;
|
||||
|
||||
if (!(gametyperules & GTR_CIRCUIT))
|
||||
|
|
@ -8249,7 +8248,7 @@ static void P_InitGametype(void)
|
|||
thwompsactive = false;
|
||||
lastLowestLap = 0;
|
||||
spbplace = -1;
|
||||
|
||||
|
||||
startedInFreePlay = false;
|
||||
{
|
||||
UINT8 nump = 0;
|
||||
|
|
@ -8484,7 +8483,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
F_RunWipe(wipedefs[wipe_encore_towhite], false);
|
||||
F_RunWipe(wipedefs[wipe_level_final], false);
|
||||
}
|
||||
|
||||
|
||||
locstarttime = nowtime = lastwipetic;
|
||||
endtime = locstarttime + (3*TICRATE)/2;
|
||||
|
||||
|
|
@ -8662,7 +8661,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
P_ResetSpawnpoints();
|
||||
|
||||
P_ResetTubeWaypoints();
|
||||
|
||||
|
||||
P_MapStart(); // g_tm.thing can be used starting from this point
|
||||
|
||||
// init anything that P_SpawnSlopes/P_LoadThings needs to know
|
||||
|
|
@ -8763,7 +8762,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
memset(localaiming, 0, sizeof(localaiming));
|
||||
K_InitDirector();
|
||||
}
|
||||
|
||||
|
||||
// Remove the loading shit from the screen
|
||||
if (rendermode != render_none && !titlemapinaction && !reloadinggamestate)
|
||||
F_WipeColorFill(levelfadecol);
|
||||
|
|
@ -8822,7 +8821,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (marathonmode & MA_INGAME)
|
||||
{
|
||||
marathonmode |= MA_INIT;
|
||||
|
|
@ -8850,7 +8849,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
G_PreLevelTitleCard();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TracyCZoneEnd(__zone);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -8859,12 +8858,12 @@ void P_PostLoadLevel(void)
|
|||
{
|
||||
TracyCZone(__zone, true);
|
||||
P_MapStart(); // g_tm.thing can be used starting from this point
|
||||
|
||||
|
||||
if (G_GametypeHasSpectators())
|
||||
{
|
||||
K_CheckSpectateStatus(false);
|
||||
}
|
||||
|
||||
|
||||
if (demo.playback)
|
||||
;
|
||||
else if (grandprixinfo.gp == true)
|
||||
|
|
@ -8885,11 +8884,11 @@ void P_PostLoadLevel(void)
|
|||
// We're in a Match Race, use simplistic randomized bots.
|
||||
K_UpdateMatchRaceBots();
|
||||
}
|
||||
|
||||
|
||||
K_TimerInit();
|
||||
|
||||
P_InitPlayers();
|
||||
|
||||
|
||||
nextmapoverride = 0;
|
||||
skipstats = 0;
|
||||
|
||||
|
|
@ -8899,10 +8898,10 @@ void P_PostLoadLevel(void)
|
|||
{
|
||||
marathonmode &= ~MA_INIT;
|
||||
}
|
||||
|
||||
|
||||
ACS_RunLevelStartScripts();
|
||||
LUA_HookGamemap(HOOK(MapLoad));
|
||||
|
||||
|
||||
UINT8 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
@ -8912,7 +8911,7 @@ void P_PostLoadLevel(void)
|
|||
continue;
|
||||
ACS_RunPlayerEnterScript(&players[i]);
|
||||
}
|
||||
|
||||
|
||||
P_MapEnd();
|
||||
|
||||
// We're now done loading the level.
|
||||
|
|
@ -9307,11 +9306,11 @@ UINT16 P_PartialAddWadFile(const char *wadfilename, wadcompat_t compat)
|
|||
|
||||
// Reload BRIGHT
|
||||
K_InitBrightmapsPwad(wadnum);
|
||||
|
||||
|
||||
// Reload TERRAIN
|
||||
if (K_InitTerrainPwad(wadnum))
|
||||
partadd_terrainloaded = true;
|
||||
|
||||
|
||||
//
|
||||
// look for skins
|
||||
//
|
||||
|
|
@ -9327,7 +9326,7 @@ UINT16 P_PartialAddWadFile(const char *wadfilename, wadcompat_t compat)
|
|||
// extra sprite/skin data
|
||||
//
|
||||
R_LoadSpriteInfoLumps(wadnum, numlumps);
|
||||
|
||||
|
||||
refreshdirmenu &= ~REFRESHDIR_GAMEDATA; // Under usual circumstances we'd wait for REFRESHDIR_ flags to disappear the next frame, but this one's a bit too dangerous for that...
|
||||
partadd_stage = 0;
|
||||
return wadnum;
|
||||
|
|
@ -9368,11 +9367,11 @@ boolean P_MultiSetupWadFiles(boolean fullsetup)
|
|||
{
|
||||
// Reload all textures, unconditionally for better or worse.
|
||||
//R_LoadTextures();
|
||||
|
||||
|
||||
// Prevent savefile cheating
|
||||
if (cursaveslot >= 0)
|
||||
cursaveslot = -1;
|
||||
|
||||
|
||||
// Reload ANIMATED / ANIMDEFS
|
||||
P_InitPicAnims();
|
||||
|
||||
|
|
@ -9404,7 +9403,7 @@ boolean P_MultiSetupWadFiles(boolean fullsetup)
|
|||
if (server)
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
if (partadd_terrainloaded && gamestate == GS_LEVEL)
|
||||
{
|
||||
CONS_Printf(M_GetText("Terrain Definition reloaded, ending the level to ensure consistency.\n"));
|
||||
|
|
@ -9415,7 +9414,7 @@ boolean P_MultiSetupWadFiles(boolean fullsetup)
|
|||
}
|
||||
|
||||
I_Assert(!fullsetup || partadd_stage < 0);
|
||||
|
||||
|
||||
if (partadd_stage < 0)
|
||||
{
|
||||
partadd_important = false;
|
||||
|
|
@ -9424,7 +9423,7 @@ boolean P_MultiSetupWadFiles(boolean fullsetup)
|
|||
partadd_earliestfile = UINT16_MAX;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
partadd_stage++;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
19
src/p_spec.c
19
src/p_spec.c
|
|
@ -2008,7 +2008,7 @@ static void K_HandleLapIncrement(player_t *player)
|
|||
player->lastsafestarpost = 0;
|
||||
player->laps++;
|
||||
|
||||
|
||||
|
||||
if (mapheaderinfo[gamemap - 1]->levelflags & LF_SECTIONRACE)
|
||||
{
|
||||
// SRB2Kart 281118
|
||||
|
|
@ -2025,7 +2025,7 @@ static void K_HandleLapIncrement(player_t *player)
|
|||
// Reset starposts (checkpoints) info
|
||||
player->starpostangle = player->starpostx = player->starposty = player->starpostz = player->starpostflip = 0;
|
||||
}
|
||||
|
||||
|
||||
if (!cv_kartdebuglap.value && player->laps == 1)
|
||||
player->pflags |= PF_TRUSTWAYPOINTS;
|
||||
K_UpdateAllPlayerPositions();
|
||||
|
|
@ -2282,8 +2282,8 @@ void P_PushSpecialLine(line_t *line, mobj_t *thing)
|
|||
// Invalid mobj.
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (line == NULL)
|
||||
{
|
||||
// Invalid line.
|
||||
|
|
@ -2528,6 +2528,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
CONS_Debug(DBG_GAMELOGIC, "Special type 400 Executor: No frontsector to copy planes from!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mapnamespace == MNS_SRB2KART)
|
||||
{
|
||||
if (line->args[2] != TMP_CEILING)
|
||||
|
|
@ -2536,10 +2537,8 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
EV_DoCeiling(line->args[1], line, instantMoveCeilingByFrontSector);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
copySector = line->frontsector;
|
||||
}
|
||||
|
||||
copySector = line->frontsector;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5235,7 +5234,6 @@ static void P_ProcessZoomTube(player_t *player, mtag_t sectag, boolean end)
|
|||
{
|
||||
speed = abs(lines[lineindex].args[0])/8;
|
||||
sequence = abs(lines[lineindex].args[1])>>FRACBITS;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5244,7 +5242,6 @@ static void P_ProcessZoomTube(player_t *player, mtag_t sectag, boolean end)
|
|||
}
|
||||
if (end)
|
||||
speed *= -1;
|
||||
|
||||
|
||||
if (speed == 0)
|
||||
{
|
||||
|
|
@ -7651,7 +7648,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
if (lines[i].args[0] > TMXT_EACHTIMEMASK) // Each time
|
||||
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMXT_EACHTIMEENTERANDEXIT);
|
||||
break;
|
||||
|
||||
|
||||
// Record attack only linedef exec
|
||||
case 323:
|
||||
if (!modeattacking)
|
||||
|
|
|
|||
Loading…
Reference in a new issue