mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 14:10:54 +00:00
Merge branch 'master' into fof-slope-skew-backport
This commit is contained in:
commit
90ebce0557
9 changed files with 64 additions and 42 deletions
|
@ -401,8 +401,7 @@ static void ExtraDataTicker(void)
|
||||||
DEBFILE(va("player %d kicked [gametic=%u] reason as follows:\n", i, gametic));
|
DEBFILE(va("player %d kicked [gametic=%u] reason as follows:\n", i, gametic));
|
||||||
}
|
}
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Got unknown net command [%s]=%d (max %d)\n"), sizeu1(curpos - bufferstart), *curpos, bufferstart[0]);
|
CONS_Alert(CONS_WARNING, M_GetText("Got unknown net command [%s]=%d (max %d)\n"), sizeu1(curpos - bufferstart), *curpos, bufferstart[0]);
|
||||||
D_FreeTextcmd(gametic);
|
break;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3308,7 +3307,7 @@ void SV_StopServer(void)
|
||||||
localtextcmd[0] = 0;
|
localtextcmd[0] = 0;
|
||||||
localtextcmd2[0] = 0;
|
localtextcmd2[0] = 0;
|
||||||
|
|
||||||
for (i = 0; i < BACKUPTICS; i++)
|
for (i = firstticstosend; i < firstticstosend + BACKUPTICS; i++)
|
||||||
D_Clearticcmd(i);
|
D_Clearticcmd(i);
|
||||||
|
|
||||||
consoleplayer = 0;
|
consoleplayer = 0;
|
||||||
|
|
|
@ -1051,15 +1051,6 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
if (M_CheckParm("-password") && M_IsNextParm())
|
if (M_CheckParm("-password") && M_IsNextParm())
|
||||||
D_SetPassword(M_GetNextParm());
|
D_SetPassword(M_GetNextParm());
|
||||||
else
|
|
||||||
{
|
|
||||||
size_t z;
|
|
||||||
char junkpw[25];
|
|
||||||
for (z = 0; z < 24; z++)
|
|
||||||
junkpw[z] = (char)(rand() & 64)+32;
|
|
||||||
junkpw[24] = '\0';
|
|
||||||
D_SetPassword(junkpw);
|
|
||||||
}
|
|
||||||
|
|
||||||
// add any files specified on the command line with -file wadfile
|
// add any files specified on the command line with -file wadfile
|
||||||
// to the wad list
|
// to the wad list
|
||||||
|
|
|
@ -2656,10 +2656,12 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt,
|
||||||
|
|
||||||
#define BASESALT "basepasswordstorage"
|
#define BASESALT "basepasswordstorage"
|
||||||
static UINT8 adminpassmd5[16];
|
static UINT8 adminpassmd5[16];
|
||||||
|
static boolean adminpasswordset = false;
|
||||||
|
|
||||||
void D_SetPassword(const char *pw)
|
void D_SetPassword(const char *pw)
|
||||||
{
|
{
|
||||||
D_MD5PasswordPass((const UINT8 *)pw, strlen(pw), BASESALT, &adminpassmd5);
|
D_MD5PasswordPass((const UINT8 *)pw, strlen(pw), BASESALT, &adminpassmd5);
|
||||||
|
adminpasswordset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remote Administration
|
// Remote Administration
|
||||||
|
@ -2728,6 +2730,12 @@ static void Got_Login(UINT8 **cp, INT32 playernum)
|
||||||
|
|
||||||
READMEM(*cp, sentmd5, 16);
|
READMEM(*cp, sentmd5, 16);
|
||||||
|
|
||||||
|
if (!adminpasswordset)
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("Password from %s failed (no password set).\n"), player_names[playernum]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (client)
|
if (client)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3951,7 +3959,7 @@ static void Command_RestartAudio_f(void)
|
||||||
I_ShutdownSound();
|
I_ShutdownSound();
|
||||||
I_StartupSound();
|
I_StartupSound();
|
||||||
I_InitMusic();
|
I_InitMusic();
|
||||||
|
|
||||||
// These must be called or no sound and music until manually set.
|
// These must be called or no sound and music until manually set.
|
||||||
|
|
||||||
I_SetSfxVolume(cv_soundvolume.value);
|
I_SetSfxVolume(cv_soundvolume.value);
|
||||||
|
@ -3959,7 +3967,7 @@ static void Command_RestartAudio_f(void)
|
||||||
I_SetMIDIMusicVolume(cv_midimusicvolume.value);
|
I_SetMIDIMusicVolume(cv_midimusicvolume.value);
|
||||||
if (Playing()) // Gotta make sure the player is in a level
|
if (Playing()) // Gotta make sure the player is in a level
|
||||||
P_RestoreMusic(&players[consoleplayer]);
|
P_RestoreMusic(&players[consoleplayer]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Quits a game and returns to the title screen.
|
/** Quits a game and returns to the title screen.
|
||||||
|
|
|
@ -977,7 +977,6 @@ static const char *credits[] = {
|
||||||
"\1Programming",
|
"\1Programming",
|
||||||
"Alam \"GBC\" Arias",
|
"Alam \"GBC\" Arias",
|
||||||
"Logan \"GBA\" Arias",
|
"Logan \"GBA\" Arias",
|
||||||
"Colette \"fickle\" Bordelon",
|
|
||||||
"Callum Dickinson",
|
"Callum Dickinson",
|
||||||
"Scott \"Graue\" Feeney",
|
"Scott \"Graue\" Feeney",
|
||||||
"Nathan \"Jazz\" Giroux",
|
"Nathan \"Jazz\" Giroux",
|
||||||
|
|
|
@ -2182,27 +2182,34 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
}
|
}
|
||||||
else if (drawtextured)
|
else if (drawtextured)
|
||||||
{
|
{
|
||||||
#ifdef ESLOPE // P.S. this is better-organized than the old version
|
fixed_t texturevpeg;
|
||||||
fixed_t offs = sides[(newline ? newline : rover->master)->sidenum[0]].rowoffset;
|
|
||||||
grTex = HWR_GetTexture(texnum);
|
|
||||||
|
|
||||||
wallVerts[3].t = (*rover->topheight - h + offs) * grTex->scaleY;
|
|
||||||
wallVerts[2].t = (*rover->topheight - hS + offs) * grTex->scaleY;
|
|
||||||
wallVerts[0].t = (*rover->topheight - l + offs) * grTex->scaleY;
|
|
||||||
wallVerts[1].t = (*rover->topheight - lS + offs) * grTex->scaleY;
|
|
||||||
#else
|
|
||||||
grTex = HWR_GetTexture(texnum);
|
|
||||||
|
|
||||||
|
// Wow, how was this missing from OpenGL for so long?
|
||||||
|
// ...Oh well, anyway, Lower Unpegged now changes pegging of FOFs like in software
|
||||||
|
// -- Monster Iestyn 26/06/18
|
||||||
if (newline)
|
if (newline)
|
||||||
{
|
{
|
||||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset) * grTex->scaleY;
|
texturevpeg = sides[newline->sidenum[0]].rowoffset;
|
||||||
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset)) * grTex->scaleY;
|
if (newline->flags & ML_DONTPEGBOTTOM)
|
||||||
|
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset) * grTex->scaleY;
|
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
|
||||||
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset)) * grTex->scaleY;
|
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
||||||
|
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grTex = HWR_GetTexture(texnum);
|
||||||
|
|
||||||
|
#ifdef ESLOPE
|
||||||
|
wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY;
|
||||||
|
#else
|
||||||
|
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
||||||
|
@ -3941,7 +3948,7 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t
|
||||||
angle_t shadowdir;
|
angle_t shadowdir;
|
||||||
|
|
||||||
// Set direction
|
// Set direction
|
||||||
if (splitscreen && stplyr != &players[displayplayer])
|
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||||
shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value);
|
shadowdir = localangle2 + FixedAngle(cv_cam2_rotate.value);
|
||||||
else
|
else
|
||||||
shadowdir = localangle + FixedAngle(cv_cam_rotate.value);
|
shadowdir = localangle + FixedAngle(cv_cam_rotate.value);
|
||||||
|
@ -5302,7 +5309,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
}
|
}
|
||||||
|
|
||||||
heightsec = thing->subsector->sector->heightsec;
|
heightsec = thing->subsector->sector->heightsec;
|
||||||
phs = players[displayplayer].mo->subsector->sector->heightsec;
|
if (viewplayer->mo && viewplayer->mo->subsector)
|
||||||
|
phs = viewplayer->mo->subsector->sector->heightsec;
|
||||||
|
else
|
||||||
|
phs = -1;
|
||||||
|
|
||||||
if (heightsec != -1 && phs != -1) // only clip things which are in special sectors
|
if (heightsec != -1 && phs != -1) // only clip things which are in special sectors
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "hw_drv.h"
|
#include "hw_drv.h"
|
||||||
#include "hw_light.h"
|
#include "hw_light.h"
|
||||||
#include "hw_md2.h"
|
#include "hw_md2.h"
|
||||||
|
#include "../d_main.h"
|
||||||
#include "../r_bsp.h"
|
#include "../r_bsp.h"
|
||||||
#include "../r_main.h"
|
#include "../r_main.h"
|
||||||
#include "../m_misc.h"
|
#include "../m_misc.h"
|
||||||
|
@ -67,6 +68,10 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef errno
|
||||||
|
#include "errno.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NUMVERTEXNORMALS 162
|
#define NUMVERTEXNORMALS 162
|
||||||
float avertexnormals[NUMVERTEXNORMALS][3] = {
|
float avertexnormals[NUMVERTEXNORMALS][3] = {
|
||||||
{-0.525731f, 0.000000f, 0.850651f},
|
{-0.525731f, 0.000000f, 0.850651f},
|
||||||
|
@ -288,7 +293,8 @@ static md2_model_t *md2_readModel(const char *filename)
|
||||||
if (model == NULL)
|
if (model == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
file = fopen(filename, "rb");
|
//Filename checking fixed ~Monster Iestyn and Golden
|
||||||
|
file = fopen(va("%s"PATHSEP"%s", srb2home, filename), "rb");
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
free(model);
|
free(model);
|
||||||
|
@ -477,7 +483,8 @@ static GrTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
png_FILE_p png_FILE;
|
png_FILE_p png_FILE;
|
||||||
char *pngfilename = va("md2/%s", filename);
|
//Filename checking fixed ~Monster Iestyn and Golden
|
||||||
|
char *pngfilename = va("%s"PATHSEP"md2"PATHSEP"%s", srb2home, filename);
|
||||||
|
|
||||||
FIL_ForceExtension(pngfilename, ".png");
|
FIL_ForceExtension(pngfilename, ".png");
|
||||||
png_FILE = fopen(pngfilename, "rb");
|
png_FILE = fopen(pngfilename, "rb");
|
||||||
|
@ -605,7 +612,8 @@ static GrTextureFormat_t PCX_Load(const char *filename, int *w, int *h,
|
||||||
size_t pw, ph, size, ptr = 0;
|
size_t pw, ph, size, ptr = 0;
|
||||||
INT32 ch, rep;
|
INT32 ch, rep;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
char *pcxfilename = va("md2/%s", filename);
|
//Filename checking fixed ~Monster Iestyn and Golden
|
||||||
|
char *pcxfilename = va("%s"PATHSEP"md2"PATHSEP"%s", srb2home, filename);
|
||||||
|
|
||||||
FIL_ForceExtension(pcxfilename, ".pcx");
|
FIL_ForceExtension(pcxfilename, ".pcx");
|
||||||
file = fopen(pcxfilename, "rb");
|
file = fopen(pcxfilename, "rb");
|
||||||
|
@ -795,11 +803,12 @@ void HWR_InitMD2(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// read the md2.dat file
|
// read the md2.dat file
|
||||||
f = fopen("md2.dat", "rt");
|
//Filename checking fixed ~Monster Iestyn and Golden
|
||||||
|
f = fopen(va("%s"PATHSEP"%s", srb2home, "md2.dat"), "rt");
|
||||||
|
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
CONS_Printf("%s", M_GetText("Error while loading md2.dat\n"));
|
CONS_Printf("%s %s\n", M_GetText("Error while loading md2.dat:"), strerror(errno));
|
||||||
nomd2s = true;
|
nomd2s = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -861,7 +870,8 @@ void HWR_AddPlayerMD2(int skin) // For MD2's that were added after startup
|
||||||
CONS_Printf("AddPlayerMD2()...\n");
|
CONS_Printf("AddPlayerMD2()...\n");
|
||||||
|
|
||||||
// read the md2.dat file
|
// read the md2.dat file
|
||||||
f = fopen("md2.dat", "rt");
|
//Filename checking fixed ~Monster Iestyn and Golden
|
||||||
|
f = fopen(va("%s"PATHSEP"%s", srb2home, "md2.dat"), "rt");
|
||||||
|
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
|
@ -906,7 +916,8 @@ void HWR_AddSpriteMD2(size_t spritenum) // For MD2s that were added after startu
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Read the md2.dat file
|
// Read the md2.dat file
|
||||||
f = fopen("md2.dat", "rt");
|
//Filename checking fixed ~Monster Iestyn and Golden
|
||||||
|
f = fopen(va("%s"PATHSEP"%s", srb2home, "md2.dat"), "rt");
|
||||||
|
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
|
@ -1347,7 +1358,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
||||||
frame = (spr->mobj->frame & FF_FRAMEMASK) % md2->model->header.numFrames;
|
frame = (spr->mobj->frame & FF_FRAMEMASK) % md2->model->header.numFrames;
|
||||||
buff = md2->model->glCommandBuffer;
|
buff = md2->model->glCommandBuffer;
|
||||||
curr = &md2->model->frames[frame];
|
curr = &md2->model->frames[frame];
|
||||||
if (cv_grmd2.value == 1)
|
if (cv_grmd2.value == 1 && tics <= durs)
|
||||||
{
|
{
|
||||||
// frames are handled differently for states with FF_ANIMATE, so get the next frame differently for the interpolation
|
// frames are handled differently for states with FF_ANIMATE, so get the next frame differently for the interpolation
|
||||||
if (spr->mobj->frame & FF_ANIMATE)
|
if (spr->mobj->frame & FF_ANIMATE)
|
||||||
|
|
|
@ -77,7 +77,9 @@ void Got_Luacmd(UINT8 **cp, INT32 playernum)
|
||||||
|
|
||||||
deny:
|
deny:
|
||||||
//must be hacked/buggy client
|
//must be hacked/buggy client
|
||||||
lua_settop(gL, 0); // clear stack
|
if (gL) // check if Lua is actually turned on first, you dummmy -- Monster Iestyn 04/07/18
|
||||||
|
lua_settop(gL, 0); // clear stack
|
||||||
|
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal lua command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal lua command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6543,7 +6543,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
||||||
if (choice < 32 || choice > 127 || itemOn != 0)
|
if (choice < 32 || choice > 127 || itemOn != 0)
|
||||||
break;
|
break;
|
||||||
l = strlen(setupm_name);
|
l = strlen(setupm_name);
|
||||||
if (l < MAXPLAYERNAME-1)
|
if (l < MAXPLAYERNAME)
|
||||||
{
|
{
|
||||||
S_StartSound(NULL,sfx_menu1); // Tails
|
S_StartSound(NULL,sfx_menu1); // Tails
|
||||||
setupm_name[l] =(char)choice;
|
setupm_name[l] =(char)choice;
|
||||||
|
|
|
@ -56,7 +56,9 @@ typedef off_t off64_t;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (_WIN32)
|
#if defined(__MINGW32__) && ((__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))
|
||||||
|
#define PRIdS "u"
|
||||||
|
#elif defined (_WIN32)
|
||||||
#define PRIdS "Iu"
|
#define PRIdS "Iu"
|
||||||
#elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3)
|
#elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3)
|
||||||
#define PRIdS "u"
|
#define PRIdS "u"
|
||||||
|
|
Loading…
Reference in a new issue