mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-28 04:00:41 +00:00
Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2.git into diagonal-spring-rings-tweak
This commit is contained in:
commit
7d603c320b
5 changed files with 20 additions and 20 deletions
|
@ -202,7 +202,7 @@ static void CONS_Bind_f(void)
|
|||
}
|
||||
|
||||
key = G_KeyStringtoNum(COM_Argv(1));
|
||||
if (!key)
|
||||
if (key <= 0 || key >= NUMINPUTS)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("Invalid key name\n"));
|
||||
return;
|
||||
|
|
|
@ -1042,13 +1042,13 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
|||
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
||||
return keystr[0];
|
||||
|
||||
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
||||
return atoi(&keystr[3]);
|
||||
|
||||
for (j = 0; j < NUMKEYNAMES; j++)
|
||||
if (!stricmp(keynames[j].name, keystr))
|
||||
return keynames[j].keynum;
|
||||
|
||||
if (strlen(keystr) > 3)
|
||||
return atoi(&keystr[3]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1217,11 +1217,11 @@ static int mapheaderinfo_get(lua_State *L)
|
|||
else {
|
||||
// Read custom vars now
|
||||
// (note: don't include the "LUA." in your lua scripts!)
|
||||
UINT8 i = 0;
|
||||
for (;i < header->numCustomOptions && !fastcmp(field, header->customopts[i].option); ++i);
|
||||
UINT8 j = 0;
|
||||
for (;j < header->numCustomOptions && !fastcmp(field, header->customopts[j].option); ++j);
|
||||
|
||||
if(i < header->numCustomOptions)
|
||||
lua_pushstring(L, header->customopts[i].value);
|
||||
if(j < header->numCustomOptions)
|
||||
lua_pushstring(L, header->customopts[j].value);
|
||||
else
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
|
|
@ -4671,11 +4671,11 @@ void P_UpdateSpecials(void)
|
|||
// ANIMATE TEXTURES
|
||||
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);
|
||||
if (anim->istexture)
|
||||
texturetranslation[i] = pic;
|
||||
texturetranslation[anim->basepic+i] = pic;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue