Fix misleading naming
This commit is contained in:
parent
58c42eec29
commit
1d5d6ead65
|
@ -81,9 +81,7 @@ struct hook_s
|
||||||
UINT16 id;
|
UINT16 id;
|
||||||
union {
|
union {
|
||||||
mobjtype_t mt;
|
mobjtype_t mt;
|
||||||
char *skinname;
|
char *str;
|
||||||
char *musname;
|
|
||||||
char *funcname;
|
|
||||||
} s;
|
} s;
|
||||||
boolean error;
|
boolean error;
|
||||||
};
|
};
|
||||||
|
@ -152,16 +150,16 @@ static int lib_addHook(lua_State *L)
|
||||||
break;
|
break;
|
||||||
case hook_BotAI:
|
case hook_BotAI:
|
||||||
case hook_ShouldJingleContinue:
|
case hook_ShouldJingleContinue:
|
||||||
hook.s.skinname = NULL;
|
hook.s.str = NULL;
|
||||||
if (lua_isstring(L, 2))
|
if (lua_isstring(L, 2))
|
||||||
{ // lowercase copy
|
{ // lowercase copy
|
||||||
hook.s.skinname = Z_StrDup(lua_tostring(L, 2));
|
hook.s.str = Z_StrDup(lua_tostring(L, 2));
|
||||||
strlwr(hook.s.skinname);
|
strlwr(hook.s.str);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case hook_LinedefExecute: // Linedef executor functions
|
case hook_LinedefExecute: // Linedef executor functions
|
||||||
hook.s.skinname = Z_StrDup(luaL_checkstring(L, 2));
|
hook.s.str = Z_StrDup(luaL_checkstring(L, 2));
|
||||||
strupr(hook.s.skinname);
|
strupr(hook.s.str);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1064,7 +1062,7 @@ boolean LUAh_BotAI(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd)
|
||||||
for (hookp = roothook; hookp; hookp = hookp->next)
|
for (hookp = roothook; hookp; hookp = hookp->next)
|
||||||
{
|
{
|
||||||
if (hookp->type != hook_BotAI
|
if (hookp->type != hook_BotAI
|
||||||
|| (hookp->s.skinname && strcmp(hookp->s.skinname, ((skin_t*)tails->skin)->name)))
|
|| (hookp->s.str && strcmp(hookp->s.str, ((skin_t*)tails->skin)->name)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lua_gettop(gL) == 0)
|
if (lua_gettop(gL) == 0)
|
||||||
|
@ -1126,7 +1124,7 @@ boolean LUAh_LinedefExecute(line_t *line, mobj_t *mo, sector_t *sector)
|
||||||
|
|
||||||
for (hookp = linedefexecutorhooks; hookp; hookp = hookp->next)
|
for (hookp = linedefexecutorhooks; hookp; hookp = hookp->next)
|
||||||
{
|
{
|
||||||
if (strcmp(hookp->s.funcname, line->text))
|
if (strcmp(hookp->s.str, line->text))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lua_gettop(gL) == 0)
|
if (lua_gettop(gL) == 0)
|
||||||
|
@ -1664,7 +1662,7 @@ boolean LUAh_ShouldJingleContinue(player_t *player, const char *musname)
|
||||||
for (hookp = roothook; hookp; hookp = hookp->next)
|
for (hookp = roothook; hookp; hookp = hookp->next)
|
||||||
{
|
{
|
||||||
if (hookp->type != hook_ShouldJingleContinue
|
if (hookp->type != hook_ShouldJingleContinue
|
||||||
|| (hookp->s.musname && strcmp(hookp->s.musname, musname)))
|
|| (hookp->s.str && strcmp(hookp->s.str, musname)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lua_gettop(gL) == 0)
|
if (lua_gettop(gL) == 0)
|
||||||
|
|
Loading…
Reference in a new issue