mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into addfile_menu
This commit is contained in:
commit
55fe0592cd
38 changed files with 101 additions and 74 deletions
6
bin/Mingw/Debug/.gitignore
vendored
6
bin/Mingw/Debug/.gitignore
vendored
|
@ -1,3 +1,3 @@
|
|||
/srb2sdl.exe
|
||||
/srb2win.exe
|
||||
/r_opengl.dll
|
||||
*.exe
|
||||
*.mo
|
||||
r_opengl.dll
|
||||
|
|
6
bin/Mingw/Release/.gitignore
vendored
6
bin/Mingw/Release/.gitignore
vendored
|
@ -1,3 +1,3 @@
|
|||
/srb2sdl.exe
|
||||
/srb2win.exe
|
||||
/r_opengl.dll
|
||||
*.exe
|
||||
*.mo
|
||||
r_opengl.dll
|
||||
|
|
8
objs/.gitignore
vendored
Normal file
8
objs/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
#All folders
|
||||
SRB2.res
|
||||
depend.dep
|
||||
depend.ped
|
||||
*.o
|
||||
#VC9 folder only
|
||||
/VC9/Win32
|
||||
/VC9/x64
|
1
objs/DC/SDL/Debug/.gitignore
vendored
1
objs/DC/SDL/Debug/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/depend.dep
|
1
objs/DC/SDL/Release/.gitignore
vendored
1
objs/DC/SDL/Release/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/depend.dep
|
2
objs/Linux/SDL/Debug/.gitignore
vendored
2
objs/Linux/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
2
objs/Linux/SDL/Release/.gitignore
vendored
2
objs/Linux/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
2
objs/Linux64/SDL/Debug/.gitignore
vendored
2
objs/Linux64/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
2
objs/Linux64/SDL/Release/.gitignore
vendored
2
objs/Linux64/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw/Debug/.gitignore
vendored
3
objs/Mingw/Debug/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw/Release/.gitignore
vendored
3
objs/Mingw/Release/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw/SDL/Debug/.gitignore
vendored
3
objs/Mingw/SDL/Debug/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw/SDL/Release/.gitignore
vendored
3
objs/Mingw/SDL/Release/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw64/Debug/.gitignore
vendored
3
objs/Mingw64/Debug/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw64/Release/.gitignore
vendored
3
objs/Mingw64/Release/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw64/SDL/Debug/.gitignore
vendored
3
objs/Mingw64/SDL/Debug/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
3
objs/Mingw64/SDL/Release/.gitignore
vendored
3
objs/Mingw64/SDL/Release/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/SRB2.res
|
||||
/depend.dep
|
||||
/*.o
|
2
objs/PS3/SDL/Debug/.gitignore
vendored
2
objs/PS3/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
2
objs/PS3/SDL/Release/.gitignore
vendored
2
objs/PS3/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
1
objs/PSP/SDL/Release/.gitignore
vendored
1
objs/PSP/SDL/Release/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/depend.dep
|
1
objs/SDL/Release/.gitignore
vendored
1
objs/SDL/Release/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/depend.ped
|
0
objs/VC/.gitignore
vendored
0
objs/VC/.gitignore
vendored
2
objs/VC9/.gitignore
vendored
2
objs/VC9/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/Win32
|
||||
/x64
|
2
objs/Wii/SDL/Debug/.gitignore
vendored
2
objs/Wii/SDL/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
2
objs/Wii/SDL/Release/.gitignore
vendored
2
objs/Wii/SDL/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
1
objs/WinCE/SDL/Release/.gitignore
vendored
1
objs/WinCE/SDL/Release/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/depend.dep
|
1
objs/djgppdos/Debug/.gitignore
vendored
1
objs/djgppdos/Debug/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/depend.dep
|
1
objs/djgppdos/Release/.gitignore
vendored
1
objs/djgppdos/Release/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/depend.dep
|
2
objs/nds/Debug/.gitignore
vendored
2
objs/nds/Debug/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
2
objs/nds/Release/.gitignore
vendored
2
objs/nds/Release/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
/depend.dep
|
||||
/*.o
|
|
@ -2533,7 +2533,7 @@ static void Command_Ban(void)
|
|||
return;
|
||||
else
|
||||
WRITEUINT8(p, pn);
|
||||
if (I_Ban && !I_Ban(node))
|
||||
if (server && I_Ban && !I_Ban(node)) // only the server is allowed to do this right now
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
||||
WRITEUINT8(p, KICK_MSG_GO_AWAY);
|
||||
|
@ -2541,7 +2541,8 @@ static void Command_Ban(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
Ban_Add(COM_Argv(2));
|
||||
if (server) // only the server is allowed to do this right now
|
||||
Ban_Add(COM_Argv(2));
|
||||
|
||||
if (COM_Argc() == 2)
|
||||
{
|
||||
|
@ -2698,12 +2699,14 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
|
||||
// If a verified admin banned someone, the server needs to know about it.
|
||||
// If the playernum isn't zero (the server) then the server needs to record the ban.
|
||||
if (server && playernum && msg == KICK_MSG_BANNED)
|
||||
if (server && playernum && (msg == KICK_MSG_BANNED || msg == KICK_MSG_CUSTOM_BAN))
|
||||
{
|
||||
if (I_Ban && !I_Ban(playernode[(INT32)pnum]))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
||||
}
|
||||
#ifndef NONET
|
||||
else
|
||||
Ban_Add(reason);
|
||||
#endif
|
||||
}
|
||||
|
||||
switch (msg)
|
||||
|
|
|
@ -2134,7 +2134,7 @@ static void Command_Teamchange_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
|
||||
return;
|
||||
|
@ -2231,7 +2231,7 @@ static void Command_Teamchange2_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
|
||||
return;
|
||||
|
|
|
@ -4731,6 +4731,7 @@ static void M_ChangeLevel(INT32 choice)
|
|||
static void M_ConfirmSpectate(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
// We allow switching to spectator even if team changing is not allowed
|
||||
M_ClearMenus(true);
|
||||
COM_ImmedExecute("changeteam spectator");
|
||||
}
|
||||
|
@ -4738,6 +4739,11 @@ static void M_ConfirmSpectate(INT32 choice)
|
|||
static void M_ConfirmEnterGame(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
if (!cv_allowteamchange.value)
|
||||
{
|
||||
M_StartMessage(M_GetText("The server is not allowing\nteam changes at this time.\nPress a key.\n"), NULL, MM_NOTHING);
|
||||
return;
|
||||
}
|
||||
M_ClearMenus(true);
|
||||
COM_ImmedExecute("changeteam playing");
|
||||
}
|
||||
|
|
|
@ -9717,11 +9717,10 @@ void P_SpawnMapThing(mapthing_t *mthing)
|
|||
switch(mobj->type)
|
||||
{
|
||||
case MT_SKYBOX:
|
||||
mobj->angle = 0;
|
||||
if (mthing->options & MTF_OBJECTSPECIAL)
|
||||
skyboxmo[1] = mobj;
|
||||
skyboxcenterpnts[mthing->extrainfo] = mobj;
|
||||
else
|
||||
skyboxmo[0] = mobj;
|
||||
skyboxviewpnts[mthing->extrainfo] = mobj;
|
||||
break;
|
||||
case MT_FAN:
|
||||
if (mthing->options & MTF_OBJECTSPECIAL)
|
||||
|
|
|
@ -2276,6 +2276,17 @@ void P_LoadThingsOnly(void)
|
|||
// Search through all the thinkers.
|
||||
mobj_t *mo;
|
||||
thinker_t *think;
|
||||
INT32 i, viewid = -1, centerid = -1; // for skyboxes
|
||||
|
||||
// check if these are any of the normal viewpoint/centerpoint mobjs in the level or not
|
||||
if (skyboxmo[0] || skyboxmo[1])
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
if (skyboxmo[0] && skyboxmo[0] == skyboxviewpnts[i])
|
||||
viewid = i; // save id just in case
|
||||
if (skyboxmo[1] && skyboxmo[1] == skyboxcenterpnts[i])
|
||||
centerid = i; // save id just in case
|
||||
}
|
||||
|
||||
for (think = thinkercap.next; think != &thinkercap; think = think->next)
|
||||
{
|
||||
|
@ -2293,6 +2304,10 @@ void P_LoadThingsOnly(void)
|
|||
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
|
||||
P_LoadThings();
|
||||
|
||||
// restore skybox viewpoint/centerpoint if necessary, set them to defaults if we can't do that
|
||||
skyboxmo[0] = skyboxviewpnts[(viewid >= 0) ? viewid : 0];
|
||||
skyboxmo[1] = skyboxcenterpnts[(centerid >= 0) ? centerid : 0];
|
||||
|
||||
P_SpawnSecretItems(true);
|
||||
}
|
||||
|
||||
|
@ -2728,6 +2743,9 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
for (i = 0; i < 2; i++)
|
||||
skyboxmo[i] = NULL;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
skyboxviewpnts[i] = skyboxcenterpnts[i] = NULL;
|
||||
|
||||
P_MapStart();
|
||||
|
||||
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
|
||||
|
@ -2737,6 +2755,9 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
#endif
|
||||
|
||||
P_LoadThings();
|
||||
// skybox mobj defaults
|
||||
skyboxmo[0] = skyboxviewpnts[0];
|
||||
skyboxmo[1] = skyboxcenterpnts[0];
|
||||
|
||||
P_SpawnSecretItems(loademblems);
|
||||
|
||||
|
|
45
src/p_spec.c
45
src/p_spec.c
|
@ -46,7 +46,9 @@
|
|||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
mobj_t *skyboxmo[2];
|
||||
mobj_t *skyboxmo[2]; // current skybox mobjs: 0 = viewpoint, 1 = centerpoint
|
||||
mobj_t *skyboxviewpnts[16]; // array of MT_SKYBOX viewpoint mobjs
|
||||
mobj_t *skyboxcenterpnts[16]; // array of MT_SKYBOX centerpoint mobjs
|
||||
|
||||
// Amount (dx, dy) vector linedef is shifted right to get scroll amount
|
||||
#define SCROLL_SHIFT 5
|
||||
|
@ -3159,6 +3161,47 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
}
|
||||
break;
|
||||
|
||||
case 448: // Change skybox viewpoint/centerpoint
|
||||
if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || (line->flags & ML_NOCLIMB))
|
||||
{
|
||||
INT32 viewid = sides[line->sidenum[0]].textureoffset>>FRACBITS;
|
||||
INT32 centerid = sides[line->sidenum[0]].rowoffset>>FRACBITS;
|
||||
|
||||
if ((line->flags & (ML_EFFECT4|ML_BLOCKMONSTERS)) == ML_EFFECT4) // Solid Midtexture is on but Block Enemies is off?
|
||||
{
|
||||
CONS_Alert(CONS_WARNING,
|
||||
M_GetText("Skybox switch linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"),
|
||||
line->tag);
|
||||
}
|
||||
else
|
||||
{
|
||||
// set viewpoint mobj
|
||||
if (!(line->flags & ML_EFFECT4)) // Solid Midtexture turns off viewpoint setting
|
||||
{
|
||||
if (viewid >= 0 && viewid < 16)
|
||||
skyboxmo[0] = skyboxviewpnts[viewid];
|
||||
else
|
||||
skyboxmo[0] = NULL;
|
||||
}
|
||||
|
||||
// set centerpoint mobj
|
||||
if (line->flags & ML_BLOCKMONSTERS) // Block Enemies turns ON centerpoint setting
|
||||
{
|
||||
if (centerid >= 0 && centerid < 16)
|
||||
skyboxmo[1] = skyboxcenterpnts[centerid];
|
||||
else
|
||||
skyboxmo[1] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
CONS_Debug(DBG_GAMELOGIC, "Line type 448 Executor: viewid = %d, centerid = %d, viewpoint? = %s, centerpoint? = %s\n",
|
||||
viewid,
|
||||
centerid,
|
||||
((line->flags & ML_EFFECT4) ? "no" : "yes"),
|
||||
((line->flags & ML_BLOCKMONSTERS) ? "yes" : "no"));
|
||||
}
|
||||
break;
|
||||
|
||||
case 450: // Execute Linedef Executor - for recursion
|
||||
P_LinedefExecute(line->tag, mo, NULL);
|
||||
break;
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
#ifndef __P_SPEC__
|
||||
#define __P_SPEC__
|
||||
|
||||
extern mobj_t *skyboxmo[2];
|
||||
extern mobj_t *skyboxmo[2]; // current skybox mobjs: 0 = viewpoint, 1 = centerpoint
|
||||
extern mobj_t *skyboxviewpnts[16]; // array of MT_SKYBOX viewpoint mobjs
|
||||
extern mobj_t *skyboxcenterpnts[16]; // array of MT_SKYBOX centerpoint mobjs
|
||||
|
||||
// GETSECSPECIAL (specialval, section)
|
||||
//
|
||||
|
|
|
@ -798,9 +798,7 @@ void R_SkyboxFrame(player_t *player)
|
|||
|
||||
viewx = viewmobj->x;
|
||||
viewy = viewmobj->y;
|
||||
viewz = 0;
|
||||
if (viewmobj->spawnpoint)
|
||||
viewz = ((fixed_t)viewmobj->spawnpoint->angle)<<FRACBITS;
|
||||
viewz = viewmobj->z; // 26/04/17: use actual Z position instead of spawnpoint angle!
|
||||
|
||||
if (mapheaderinfo[gamemap-1])
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue