mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-14 08:50:53 +00:00
Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2.git into 2214-pre2
This commit is contained in:
commit
3b7543645a
7 changed files with 29 additions and 29 deletions
|
@ -999,20 +999,8 @@ static void I_GetConsoleEvents(void)
|
|||
static void I_StartupConsole(void)
|
||||
{
|
||||
HANDLE ci, co;
|
||||
const INT32 ded = M_CheckParm("-dedicated");
|
||||
BOOL gotConsole = FALSE;
|
||||
if (M_CheckParm("-console") || ded)
|
||||
gotConsole = AllocConsole();
|
||||
#ifdef _DEBUG
|
||||
else if (M_CheckParm("-noconsole") && !ded)
|
||||
#else
|
||||
else if (!M_CheckParm("-console") && !ded)
|
||||
#endif
|
||||
{
|
||||
FreeConsole();
|
||||
gotConsole = FALSE;
|
||||
}
|
||||
|
||||
BOOL gotConsole = AllocConsole();
|
||||
consolevent = !M_CheckParm("-noconsole");
|
||||
if (gotConsole)
|
||||
{
|
||||
SetConsoleTitleA("SRB2 Console");
|
||||
|
@ -1040,12 +1028,7 @@ static inline void I_ShutdownConsole(void){}
|
|||
static void I_GetConsoleEvents(void){}
|
||||
static inline void I_StartupConsole(void)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
consolevent = !M_CheckParm("-noconsole");
|
||||
#else
|
||||
consolevent = M_CheckParm("-console");
|
||||
#endif
|
||||
|
||||
framebuffer = M_CheckParm("-framebuffer");
|
||||
|
||||
if (framebuffer)
|
||||
|
|
|
@ -157,7 +157,7 @@ void I_wake_all_cond(I_cond *anchor)
|
|||
pthread_mutex_lock(&thread_lock);
|
||||
if (*anchor == NULL)
|
||||
{
|
||||
*anchor = malloc(sizeof(pthread_t));
|
||||
*anchor = malloc(sizeof(pthread_cond_t));
|
||||
pthread_cond_init(*anchor, NULL);
|
||||
}
|
||||
pthread_mutex_unlock(&thread_lock);
|
||||
|
|
|
@ -498,7 +498,9 @@ static int call_string_hooks(Hook_State *hook)
|
|||
|
||||
static int call_mobj_type_hooks(Hook_State *hook, mobjtype_t mobj_type)
|
||||
{
|
||||
if (mobj_type == MT_NULL && (
|
||||
int numCalls = call_mapped(hook, &mobjHookIds[mobj_type][hook->hook_type]);
|
||||
|
||||
if (numCalls > 0 && mobj_type == MT_NULL && (
|
||||
hook->hook_type == MOBJ_HOOK(MobjThinker )
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjCollide )
|
||||
|| hook->hook_type == MOBJ_HOOK(MobjLineCollide)
|
||||
|
@ -514,7 +516,7 @@ static int call_mobj_type_hooks(Hook_State *hook, mobjtype_t mobj_type)
|
|||
mobjHookNames[hook->hook_type])
|
||||
);
|
||||
|
||||
return call_mapped(hook, &mobjHookIds[mobj_type][hook->hook_type]);
|
||||
return numCalls;
|
||||
}
|
||||
|
||||
static void call_hud_hooks
|
||||
|
|
|
@ -1501,13 +1501,13 @@ static void UnArchiveSectors(save_t *save_p)
|
|||
sectors[i].ceilingheight = P_ReadFixed(save_p);
|
||||
if (diff & SD_FLOORPIC)
|
||||
{
|
||||
sectors[i].floorpic = P_AddLevelFlatRuntime((char *)save_p);
|
||||
save_p += 8;
|
||||
sectors[i].floorpic = P_AddLevelFlatRuntime((char *)&save_p->buf[save_p->pos]);
|
||||
save_p->pos += 8;
|
||||
}
|
||||
if (diff & SD_CEILPIC)
|
||||
{
|
||||
sectors[i].ceilingpic = P_AddLevelFlatRuntime((char *)save_p);
|
||||
save_p += 8;
|
||||
sectors[i].ceilingpic = P_AddLevelFlatRuntime((char *)&save_p->buf[save_p->pos]);
|
||||
save_p->pos += 8;
|
||||
}
|
||||
if (diff & SD_LIGHT)
|
||||
sectors[i].lightlevel = P_ReadINT16(save_p);
|
||||
|
|
10
src/r_main.c
10
src/r_main.c
|
@ -1152,8 +1152,14 @@ void R_SetupFrame(player_t *player)
|
|||
|
||||
if (quake.epicenter) {
|
||||
// Calculate 3D distance from epicenter, using the camera.
|
||||
fixed_t xydist = R_PointToDist2(thiscam->x, thiscam->y, quake.epicenter->x, quake.epicenter->y);
|
||||
fixed_t dist = R_PointToDist2(0, thiscam->z, xydist, quake.epicenter->z);
|
||||
fixed_t xydist, dist;
|
||||
if (P_MobjWasRemoved(r_viewmobj)) {
|
||||
xydist = R_PointToDist2(thiscam->x, thiscam->y, quake.epicenter->x, quake.epicenter->y);
|
||||
dist = R_PointToDist2(0, thiscam->z, xydist, quake.epicenter->z);
|
||||
} else {
|
||||
xydist = R_PointToDist2(r_viewmobj->x, r_viewmobj->y, quake.epicenter->x, quake.epicenter->y);
|
||||
dist = R_PointToDist2(0, r_viewmobj->z, xydist, quake.epicenter->z);
|
||||
}
|
||||
|
||||
// More effect closer to epicenter, outside of radius = no effect
|
||||
if (!quake.radius || dist > quake.radius)
|
||||
|
|
|
@ -279,6 +279,14 @@ static boolean GetFramesAndRotationsFromShortLumpName(
|
|||
*ret_rotation2 = R_Char2Rotation(name[7]);
|
||||
if (*ret_frame2 >= 64 || *ret_rotation2 == 255)
|
||||
return false;
|
||||
|
||||
// TRNSLATE is a valid but extremely unlikely sprite name:
|
||||
// * The sprite name is "TRNS"
|
||||
// * The frame is L, rotation A; mirrored to frame T, rotation E
|
||||
// In the very unfortunate event that TRNSLATE is found between sprite lumps,
|
||||
// this name check prevents it from being added as a sprite, when it actually isn't.
|
||||
if (memcmp(name, "TRNSLATE", 8) == 0)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2657,7 +2657,8 @@ static lumpchecklist_t folderblacklist[] =
|
|||
{
|
||||
{"Lua/", 4},
|
||||
{"SOC/", 4},
|
||||
{"Sprites/", 8},
|
||||
{"Sprites/", 8},
|
||||
{"LongSprites/", 12},
|
||||
{"Textures/", 9},
|
||||
{"Patches/", 8},
|
||||
{"Flats/", 6},
|
||||
|
|
Loading…
Reference in a new issue