mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
Remove stupid dumbfuck #ifdefs
WHY THE FUCK DID THESE BREAK IT AAAAAAAAAAAAAAAAAAA
This commit is contained in:
parent
d4c69f137a
commit
95e7e59179
5 changed files with 2 additions and 18 deletions
|
@ -1898,7 +1898,6 @@ static int lib_sSpeedMusic(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LUA_MUSICPLUS
|
||||
static int lib_sMusicType(lua_State *L)
|
||||
{
|
||||
player_t *player = NULL;
|
||||
|
@ -2283,7 +2282,6 @@ static int lib_sFadeOutStopMusic(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
static int lib_sOriginPlaying(lua_State *L)
|
||||
{
|
||||
void *origin = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
|
@ -3114,7 +3112,6 @@ static luaL_Reg lib[] = {
|
|||
{"S_ShowMusicCredit",lib_sShowMusicCredit},
|
||||
{"S_ChangeMusic",lib_sChangeMusic},
|
||||
{"S_SpeedMusic",lib_sSpeedMusic},
|
||||
#ifdef HAVE_LUA_MUSICPLUS
|
||||
{"S_MusicType",lib_sMusicType},
|
||||
{"S_MusicPlaying",lib_sMusicPlaying},
|
||||
{"S_MusicPaused",lib_sMusicPaused},
|
||||
|
@ -3133,7 +3130,6 @@ static luaL_Reg lib[] = {
|
|||
{"S_StopFadingMusic",lib_sStopFadingMusic},
|
||||
{"S_FadeMusic",lib_sFadeMusic},
|
||||
{"S_FadeOutStopMusic",lib_sFadeOutStopMusic},
|
||||
#endif
|
||||
{"S_OriginPlaying",lib_sOriginPlaying},
|
||||
{"S_IdPlaying",lib_sIdPlaying},
|
||||
{"S_SoundPlaying",lib_sSoundPlaying},
|
||||
|
|
|
@ -44,9 +44,7 @@ enum hook {
|
|||
hook_HurtMsg,
|
||||
hook_PlayerSpawn,
|
||||
hook_PlayerQuit,
|
||||
#ifdef HAVE_LUA_MUSICPLUS
|
||||
hook_MusicChange,
|
||||
#endif
|
||||
hook_ShouldSpin, //SRB2KART
|
||||
hook_ShouldExplode, //SRB2KART
|
||||
hook_ShouldSquish, //SRB2KART
|
||||
|
@ -93,10 +91,8 @@ boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg, int mute);
|
|||
boolean LUAh_HurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source); // Hook for hurt messages
|
||||
#define LUAh_PlayerSpawn(player) LUAh_PlayerHook(player, hook_PlayerSpawn) // Hook for G_SpawnPlayer
|
||||
void LUAh_PlayerQuit(player_t *plr, int reason); // Hook for player quitting
|
||||
#ifdef HAVE_LUA_MUSICPLUS
|
||||
boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boolean *looping,
|
||||
UINT32 *position, UINT32 *prefadems, UINT32 *fadeinms); // Hook for music changes
|
||||
#endif
|
||||
|
||||
UINT8 LUAh_ShouldSpin(player_t *player, mobj_t *inflictor, mobj_t *source); // SRB2KART: Should player be spun out?
|
||||
UINT8 LUAh_ShouldExplode(player_t *player, mobj_t *inflictor, mobj_t *source); // SRB2KART: Should player be exploded?
|
||||
|
|
|
@ -55,9 +55,7 @@ const char *const hookNames[hook_MAX+1] = {
|
|||
"HurtMsg",
|
||||
"PlayerSpawn",
|
||||
"PlayerQuit",
|
||||
#ifdef HAVE_LUA_MUSICPLUS
|
||||
"MusicChange",
|
||||
#endif
|
||||
"ShouldSpin",
|
||||
"ShouldExplode",
|
||||
"ShouldSquish",
|
||||
|
@ -1216,8 +1214,6 @@ void LUAh_PlayerQuit(player_t *plr, int reason)
|
|||
lua_settop(gL, 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LUA_MUSICPLUS
|
||||
|
||||
// Hook for music changes
|
||||
boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boolean *looping,
|
||||
UINT32 *position, UINT32 *prefadems, UINT32 *fadeinms)
|
||||
|
@ -1277,8 +1273,6 @@ boolean LUAh_MusicChange(const char *oldname, char *newname, UINT16 *mflags, boo
|
|||
return hooked;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Hook for K_SpinPlayer. Determines if yes or no we should get damaged reguardless of circumstances.
|
||||
UINT8 LUAh_ShouldSpin(player_t *player, mobj_t *inflictor, mobj_t *source)
|
||||
{
|
||||
|
|
|
@ -98,6 +98,4 @@ void COM_Lua_f(void);
|
|||
}\
|
||||
}
|
||||
|
||||
#define HAVE_LUA_MUSICPLUS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@ extern INT32 msg_id;
|
|||
#include "p_local.h" // camera info
|
||||
#include "m_misc.h" // for tunes command
|
||||
|
||||
#if defined(HAVE_BLUA) && defined(HAVE_LUA_MUSICPLUS)
|
||||
#ifdef HAVE_BLUA
|
||||
#include "lua_hook.h" // MusicChange hook
|
||||
#endif
|
||||
|
||||
|
@ -1989,7 +1989,7 @@ void S_ChangeMusicEx(const char *mmusic, UINT16 mflags, boolean looping, UINT32
|
|||
return;
|
||||
|
||||
strncpy(newmusic, mmusic, 7);
|
||||
#if defined(HAVE_BLUA) && defined(HAVE_LUA_MUSICPLUS)
|
||||
#ifdef HAVE_BLUA
|
||||
if(LUAh_MusicChange(music_name, newmusic, &mflags, &looping, &position, &prefadems, &fadeinms))
|
||||
return;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue