Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into diagonal-spring-rings-tweak
This commit is contained in:
commit
7d603c320b
|
@ -202,7 +202,7 @@ static void CONS_Bind_f(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
key = G_KeyStringtoNum(COM_Argv(1));
|
key = G_KeyStringtoNum(COM_Argv(1));
|
||||||
if (!key)
|
if (key <= 0 || key >= NUMINPUTS)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n"));
|
CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n"));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1042,13 +1042,13 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
||||||
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
||||||
return keystr[0];
|
return keystr[0];
|
||||||
|
|
||||||
|
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
||||||
|
return atoi(&keystr[3]);
|
||||||
|
|
||||||
for (j = 0; j < NUMKEYNAMES; j++)
|
for (j = 0; j < NUMKEYNAMES; j++)
|
||||||
if (!stricmp(keynames[j].name, keystr))
|
if (!stricmp(keynames[j].name, keystr))
|
||||||
return keynames[j].keynum;
|
return keynames[j].keynum;
|
||||||
|
|
||||||
if (strlen(keystr) > 3)
|
|
||||||
return atoi(&keystr[3]);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1217,11 +1217,11 @@ static int mapheaderinfo_get(lua_State *L)
|
||||||
else {
|
else {
|
||||||
// Read custom vars now
|
// Read custom vars now
|
||||||
// (note: don't include the "LUA." in your lua scripts!)
|
// (note: don't include the "LUA." in your lua scripts!)
|
||||||
UINT8 i = 0;
|
UINT8 j = 0;
|
||||||
for (;i < header->numCustomOptions && !fastcmp(field, header->customopts[i].option); ++i);
|
for (;j < header->numCustomOptions && !fastcmp(field, header->customopts[j].option); ++j);
|
||||||
|
|
||||||
if(i < header->numCustomOptions)
|
if(j < header->numCustomOptions)
|
||||||
lua_pushstring(L, header->customopts[i].value);
|
lua_pushstring(L, header->customopts[j].value);
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4671,11 +4671,11 @@ void P_UpdateSpecials(void)
|
||||||
// ANIMATE TEXTURES
|
// ANIMATE TEXTURES
|
||||||
for (anim = anims; anim < lastanim; anim++)
|
for (anim = anims; anim < lastanim; anim++)
|
||||||
{
|
{
|
||||||
for (i = anim->basepic; i < anim->basepic + anim->numpics; i++)
|
for (i = 0; i < anim->numpics; i++)
|
||||||
{
|
{
|
||||||
pic = anim->basepic + ((leveltime/anim->speed + i) % anim->numpics);
|
pic = anim->basepic + ((leveltime/anim->speed + i) % anim->numpics);
|
||||||
if (anim->istexture)
|
if (anim->istexture)
|
||||||
texturetranslation[i] = pic;
|
texturetranslation[anim->basepic+i] = pic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
20
src/r_bsp.c
20
src/r_bsp.c
|
@ -935,14 +935,14 @@ static void R_Subsector(size_t num)
|
||||||
|
|
||||||
ffloor[numffloors].plane = NULL;
|
ffloor[numffloors].plane = NULL;
|
||||||
ffloor[numffloors].polyobj = NULL;
|
ffloor[numffloors].polyobj = NULL;
|
||||||
|
|
||||||
floorcenterz =
|
floorcenterz =
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
frontsector->f_slope ? P_GetZAt(frontsector->f_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
frontsector->f_slope ? P_GetZAt(frontsector->f_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||||
#endif
|
#endif
|
||||||
frontsector->floorheight;
|
frontsector->floorheight;
|
||||||
|
|
||||||
ceilingcenterz =
|
ceilingcenterz =
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
frontsector->c_slope ? P_GetZAt(frontsector->c_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
frontsector->c_slope ? P_GetZAt(frontsector->c_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||||
#endif
|
#endif
|
||||||
|
@ -953,8 +953,8 @@ static void R_Subsector(size_t num)
|
||||||
*rover->b_slope ? P_GetZAt(*rover->b_slope, viewx, viewy) :
|
*rover->b_slope ? P_GetZAt(*rover->b_slope, viewx, viewy) :
|
||||||
#endif
|
#endif
|
||||||
*rover->bottomheight;
|
*rover->bottomheight;
|
||||||
|
|
||||||
planecenterz =
|
planecenterz =
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
*rover->b_slope ? P_GetZAt(*rover->b_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
*rover->b_slope ? P_GetZAt(*rover->b_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||||
#endif
|
#endif
|
||||||
|
@ -966,7 +966,7 @@ static void R_Subsector(size_t num)
|
||||||
{
|
{
|
||||||
light = R_GetPlaneLight(frontsector, planecenterz,
|
light = R_GetPlaneLight(frontsector, planecenterz,
|
||||||
viewz < *rover->bottomheight);
|
viewz < *rover->bottomheight);
|
||||||
|
|
||||||
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
||||||
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
||||||
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
||||||
|
@ -1002,8 +1002,8 @@ static void R_Subsector(size_t num)
|
||||||
*rover->t_slope ? P_GetZAt(*rover->t_slope, viewx, viewy) :
|
*rover->t_slope ? P_GetZAt(*rover->t_slope, viewx, viewy) :
|
||||||
#endif
|
#endif
|
||||||
*rover->topheight;
|
*rover->topheight;
|
||||||
|
|
||||||
planecenterz =
|
planecenterz =
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
*rover->t_slope ? P_GetZAt(*rover->t_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
*rover->t_slope ? P_GetZAt(*rover->t_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||||
#endif
|
#endif
|
||||||
|
@ -1014,7 +1014,7 @@ static void R_Subsector(size_t num)
|
||||||
|| (viewz < heightcheck && (rover->flags & FF_BOTHPLANES))))
|
|| (viewz < heightcheck && (rover->flags & FF_BOTHPLANES))))
|
||||||
{
|
{
|
||||||
light = R_GetPlaneLight(frontsector, planecenterz, viewz < *rover->topheight);
|
light = R_GetPlaneLight(frontsector, planecenterz, viewz < *rover->topheight);
|
||||||
|
|
||||||
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
||||||
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
||||||
frontsector->lightlist[light].extra_colormap, rover
|
frontsector->lightlist[light].extra_colormap, rover
|
||||||
|
|
Loading…
Reference in a new issue