Merge branch 'fix-no_lua' into 'master'

Fix NO_LUA

See merge request KartKrew/Kart-Public!66
This commit is contained in:
wolfs 2019-02-16 06:10:03 -05:00
commit abb3e8e4e3
2 changed files with 10 additions and 0 deletions

View File

@ -1891,8 +1891,10 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, mobj_t *inflicto
} }
} }
#ifdef HAVE_BLUA
if (LUAh_PlayerSpin(player, inflictor, source)) // Let Lua do its thing or overwrite if it wants to. Make sure to let any possible instashield happen because we didn't get "damaged" in this case. if (LUAh_PlayerSpin(player, inflictor, source)) // Let Lua do its thing or overwrite if it wants to. Make sure to let any possible instashield happen because we didn't get "damaged" in this case.
return; return;
#endif
if (source && source != player->mo && source->player) if (source && source != player->mo && source->player)
K_PlayHitEmSound(source); K_PlayHitEmSound(source);
@ -2022,8 +2024,10 @@ void K_SquishPlayer(player_t *player, mobj_t *source, mobj_t *inflictor)
} }
} }
#ifdef HAVE_BLUA
if (LUAh_PlayerSquish(player, inflictor, source)) // Let Lua do its thing or overwrite if it wants to. Make sure to let any possible instashield happen because we didn't get "damaged" in this case. if (LUAh_PlayerSquish(player, inflictor, source)) // Let Lua do its thing or overwrite if it wants to. Make sure to let any possible instashield happen because we didn't get "damaged" in this case.
return; return;
#endif
player->kartstuff[k_sneakertimer] = 0; player->kartstuff[k_sneakertimer] = 0;
player->kartstuff[k_driftboost] = 0; player->kartstuff[k_driftboost] = 0;
@ -2136,8 +2140,10 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b
} }
} }
#ifdef HAVE_BLUA
if (LUAh_PlayerExplode(player, inflictor, source)) // Same thing. Also make sure to let Instashield happen blah blah if (LUAh_PlayerExplode(player, inflictor, source)) // Same thing. Also make sure to let Instashield happen blah blah
return; return;
#endif
if (source && source != player->mo && source->player) if (source && source != player->mo && source->player)
K_PlayHitEmSound(source); K_PlayHitEmSound(source);

View File

@ -191,8 +191,10 @@ static inline void W_LoadDehackedLumpsPK3(UINT16 wadnum)
{ {
posEnd = W_CheckNumForFolderEndPK3("Lua/", wadnum, posStart); posEnd = W_CheckNumForFolderEndPK3("Lua/", wadnum, posStart);
posStart++; posStart++;
#ifdef HAVE_BLUA
for (; posStart < posEnd; posStart++) for (; posStart < posEnd; posStart++)
LUA_LoadLump(wadnum, posStart); LUA_LoadLump(wadnum, posStart);
#endif
} }
posStart = W_CheckNumForFolderStartPK3("SOC/", wadnum, 0); posStart = W_CheckNumForFolderStartPK3("SOC/", wadnum, 0);
if (posStart != INT16_MAX) if (posStart != INT16_MAX)
@ -794,7 +796,9 @@ UINT16 W_InitFile(const char *filename)
DEH_LoadDehackedLumpPwad(numwadfiles - 1, 0); DEH_LoadDehackedLumpPwad(numwadfiles - 1, 0);
break; break;
case RET_LUA: case RET_LUA:
#ifdef HAVE_BLUA
LUA_LoadLump(numwadfiles - 1, 0); LUA_LoadLump(numwadfiles - 1, 0);
#endif
break; break;
default: default:
break; break;