Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into addfile_menu

This commit is contained in:
toasterbabe 2017-05-08 23:43:21 +01:00
commit 72baa4e2d0
31 changed files with 110 additions and 45 deletions

2
objs/DC/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/DC/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Linux/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Linux/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Linux64/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Linux64/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw64/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw64/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw64/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Mingw64/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/PS3/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/PS3/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/PSP/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/VC/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/VC9/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Wii/SDL/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/Wii/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/WinCE/SDL/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/djgppdos/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/djgppdos/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/nds/Debug/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/nds/Release/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -9765,20 +9765,16 @@ void P_SpawnMapThing(mapthing_t *mthing)
mobjtype_t macetype = MT_SMALLMACE;
boolean firsttime;
mobj_t *spawnee;
size_t line;
INT32 line;
const size_t mthingi = (size_t)(mthing - mapthings);
// Why does P_FindSpecialLineFromTag not work here?!?
// Monster Iestyn: tag lists haven't been initialised yet for the map, that's why
for (line = 0; line < numlines; line++)
{
if (lines[line].special == 9 && lines[line].tag == mthing->angle)
break;
}
// Find the corresponding linedef special, using angle as tag
// P_FindSpecialLineFromTag works here now =D
line = P_FindSpecialLineFromTag(9, mthing->angle, -1);
if (line == numlines)
if (line == -1)
{
CONS_Debug(DBG_GAMELOGIC, "Mace chain (mapthing #%s) needs tagged to a #9 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
CONS_Debug(DBG_GAMELOGIC, "Mace chain (mapthing #%s) needs to be tagged to a #9 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
return;
}
/*
@ -9876,18 +9872,15 @@ ML_NOCLIMB : Direction not controllable
fixed_t radius, speed, bottomheight, topheight;
INT32 type, numdivisions, time, anglespeed;
angle_t angledivision;
size_t line;
INT32 line;
const size_t mthingi = (size_t)(mthing - mapthings);
for (line = 0; line < numlines; line++)
{
if (lines[line].special == 15 && lines[line].tag == mthing->angle)
break;
}
// Find the corresponding linedef special, using angle as tag
line = P_FindSpecialLineFromTag(15, mthing->angle, -1);
if (line == numlines)
if (line == -1)
{
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%s) needs tagged to a #15 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%s) needs to be tagged to a #15 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
return;
}

View File

@ -2591,8 +2591,7 @@ boolean P_SetupLevel(boolean skipprecip)
postimgtype = postimgtype2 = postimg_none;
if (mapheaderinfo[gamemap-1]->forcecharacter[0] != '\0'
&& atoi(mapheaderinfo[gamemap-1]->forcecharacter) != 255)
if (mapheaderinfo[gamemap-1]->forcecharacter[0] != '\0')
P_ForceCharacter(mapheaderinfo[gamemap-1]->forcecharacter);
// chasecam on in chaos, race, coop
@ -2752,6 +2751,10 @@ boolean P_SetupLevel(boolean skipprecip)
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
// init gravity, tag lists,
// anything that P_ResetDynamicSlopes/P_LoadThings needs to know
P_InitSpecials();
#ifdef ESLOPE
P_ResetDynamicSlopes();
#endif
@ -2773,8 +2776,6 @@ boolean P_SetupLevel(boolean skipprecip)
if (loadprecip) // ugly hack for P_NetUnArchiveMisc (and P_LoadNetGame)
P_SpawnPrecipitation();
globalweather = mapheaderinfo[gamemap-1]->weather;
#ifdef HWRENDER // not win32 only 19990829 by Kin
if (rendermode != render_soft && rendermode != render_none)
{

View File

@ -5589,6 +5589,45 @@ static void P_RunLevelLoadExecutors(void)
}
}
/** Before things are loaded, initialises certain stuff in case they're needed
* by P_ResetDynamicSlopes or P_LoadThings. This was split off from
* P_SpawnSpecials, in case you couldn't tell.
*
* \sa P_SpawnSpecials, P_InitTagLists
* \author Monster Iestyn
*/
void P_InitSpecials(void)
{
// Set the default gravity. Custom gravity overrides this setting.
gravity = FRACUNIT/2;
// Defaults in case levels don't have them set.
sstimer = 90*TICRATE + 6;
totalrings = 1;
CheckForBustableBlocks = CheckForBouncySector = CheckForQuicksand = CheckForMarioBlocks = CheckForFloatBob = CheckForReverseGravity = false;
// Set curWeather
switch (mapheaderinfo[gamemap-1]->weather)
{
case PRECIP_SNOW: // snow
case PRECIP_RAIN: // rain
case PRECIP_STORM: // storm
case PRECIP_STORM_NORAIN: // storm w/o rain
case PRECIP_STORM_NOSTRIKES: // storm w/o lightning
curWeather = mapheaderinfo[gamemap-1]->weather;
break;
default: // blank/none
curWeather = PRECIP_NONE;
break;
}
// Set globalweather
globalweather = mapheaderinfo[gamemap-1]->weather;
P_InitTagLists(); // Create xref tables for tags
}
/** After the map has loaded, scans for specials that spawn 3Dfloors and
* thinkers.
*
@ -5610,15 +5649,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
// but currently isn't.
(void)fromnetsave;
// Set the default gravity. Custom gravity overrides this setting.
gravity = FRACUNIT/2;
// Defaults in case levels don't have them set.
sstimer = 90*TICRATE + 6;
totalrings = 1;
CheckForBustableBlocks = CheckForBouncySector = CheckForQuicksand = CheckForMarioBlocks = CheckForFloatBob = CheckForReverseGravity = false;
// Init special SECTORs.
sector = sectors;
for (i = 0; i < numsectors; i++, sector++)
@ -5667,20 +5697,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
}
}
if (mapheaderinfo[gamemap-1]->weather == 2) // snow
curWeather = PRECIP_SNOW;
else if (mapheaderinfo[gamemap-1]->weather == 3) // rain
curWeather = PRECIP_RAIN;
else if (mapheaderinfo[gamemap-1]->weather == 1) // storm
curWeather = PRECIP_STORM;
else if (mapheaderinfo[gamemap-1]->weather == 5) // storm w/o rain
curWeather = PRECIP_STORM_NORAIN;
else if (mapheaderinfo[gamemap-1]->weather == 6) // storm w/o lightning
curWeather = PRECIP_STORM_NOSTRIKES;
else
curWeather = PRECIP_NONE;
P_InitTagLists(); // Create xref tables for tags
P_SearchForDisableLinedefs(); // Disable linedefs are now allowed to disable *any* line
P_SpawnScrollers(); // Add generalized scrollers

View File

@ -34,6 +34,7 @@ void P_InitPicAnims(void);
void P_SetupLevelFlatAnims(void);
// at map load
void P_InitSpecials(void);
void P_SpawnSpecials(INT32 fromnetsave);
// every tic