mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-19 16:01:35 +00:00
Remove P_FindSpecialLineFromTag()
This commit is contained in:
parent
7d3d71c418
commit
95c7690a40
3 changed files with 0 additions and 46 deletions
|
@ -1915,17 +1915,6 @@ static int lib_pFindHighestCeilingSurrounding(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pFindSpecialLineFromTag(lua_State *L)
|
||||
{
|
||||
INT16 special = (INT16)luaL_checkinteger(L, 1);
|
||||
INT16 line = (INT16)luaL_checkinteger(L, 2);
|
||||
INT32 start = (INT32)luaL_optinteger(L, 3, -1);
|
||||
NOHUD
|
||||
INLEVEL
|
||||
lua_pushinteger(L, P_FindSpecialLineFromTag(special, line, start));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pSwitchWeather(lua_State *L)
|
||||
{
|
||||
INT32 weathernum = (INT32)luaL_checkinteger(L, 1);
|
||||
|
@ -3213,7 +3202,6 @@ static luaL_Reg lib[] = {
|
|||
{"P_FindNextLowestFloor",lib_pFindNextLowestFloor},
|
||||
{"P_FindLowestCeilingSurrounding",lib_pFindLowestCeilingSurrounding},
|
||||
{"P_FindHighestCeilingSurrounding",lib_pFindHighestCeilingSurrounding},
|
||||
{"P_FindSpecialLineFromTag",lib_pFindSpecialLineFromTag},
|
||||
{"P_SwitchWeather",lib_pSwitchWeather},
|
||||
{"P_LinedefExecute",lib_pLinedefExecute},
|
||||
{"P_SpawnLightningFlash",lib_pSpawnLightningFlash},
|
||||
|
|
32
src/p_spec.c
32
src/p_spec.c
|
@ -988,38 +988,6 @@ static sector_t *P_FindModelCeilingSector(fixed_t ceildestheight, INT32 secnum)
|
|||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// P_FindSpecialLineFromTag
|
||||
//
|
||||
INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start)
|
||||
{
|
||||
if (tag == -1)
|
||||
{
|
||||
start++;
|
||||
|
||||
// This redundant check stops the compiler from complaining about function expansion
|
||||
// elsewhere for some reason and everything is awful
|
||||
if (start >= (INT32)numlines)
|
||||
return -1;
|
||||
|
||||
while (start < (INT32)numlines && lines[start].special != special)
|
||||
start++;
|
||||
|
||||
if (start >= (INT32)numlines)
|
||||
return -1;
|
||||
|
||||
return start;
|
||||
}
|
||||
else
|
||||
{
|
||||
start = start >= 0 ? lines[start].nexttag :
|
||||
lines[(unsigned)tag % numlines].firsttag;
|
||||
while (start >= 0 && (lines[start].tag != tag || lines[start].special != special))
|
||||
start = lines[start].nexttag;
|
||||
return start;
|
||||
}
|
||||
}
|
||||
|
||||
// haleyjd: temporary define
|
||||
#ifdef POLYOBJECTS
|
||||
|
||||
|
|
|
@ -55,8 +55,6 @@ fixed_t P_FindNextLowestFloor(sector_t *sec, fixed_t currentheight);
|
|||
fixed_t P_FindLowestCeilingSurrounding(sector_t *sec);
|
||||
fixed_t P_FindHighestCeilingSurrounding(sector_t *sec);
|
||||
|
||||
INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start);
|
||||
|
||||
INT32 P_FindMinSurroundingLight(sector_t *sector, INT32 max);
|
||||
|
||||
void P_SetupSignExit(player_t *player);
|
||||
|
|
Loading…
Reference in a new issue