@@ -797,23 +797,23 @@ void HexagonGame::newGame(const std::string& mPackId, const std::string& mId,
797
797
inputImplCCW = inputImplCW = false ;
798
798
playerNowReadyToSwap = false ;
799
799
800
- if (!firstPlay) runLuaFunctionIfExists< void > (" onPreUnload" );
800
+ if (!firstPlay) runVoidLuaFunctionIfExists (" onPreUnload" );
801
801
lua = Lua::LuaContext{};
802
802
calledDeprecatedFunctions.clear ();
803
803
initLua ();
804
804
runLuaFile (levelData->luaScriptPath );
805
805
806
806
if (!firstPlay)
807
807
{
808
- runLuaFunctionIfExists< void > (" onUnload" );
808
+ runVoidLuaFunctionIfExists (" onUnload" );
809
809
playSoundOverride (" restart.ogg" );
810
810
}
811
811
else
812
812
{
813
813
playSoundOverride (" select.ogg" );
814
814
}
815
815
816
- runLuaFunctionIfExists< void > (" onInit" );
816
+ runVoidLuaFunctionIfExists (" onInit" );
817
817
818
818
restartId = mId ;
819
819
restartFirstTime = false ;
@@ -1025,14 +1025,14 @@ void HexagonGame::death(bool mForce)
1025
1025
1026
1026
playSoundAbort (levelStatus.deathSound );
1027
1027
1028
- runLuaFunctionIfExists< void > (" onPreDeath" );
1028
+ runVoidLuaFunctionIfExists (" onPreDeath" );
1029
1029
1030
1030
if (!mForce && (Config::getInvincible () || levelStatus.tutorialMode ))
1031
1031
{
1032
1032
return ;
1033
1033
}
1034
1034
1035
- runLuaFunctionIfExists< void > (" onDeath" );
1035
+ runVoidLuaFunctionIfExists (" onDeath" );
1036
1036
death_shakeCamera ();
1037
1037
death_updateRichPresence ();
1038
1038
stopLevelMusic ();
@@ -1245,7 +1245,7 @@ void HexagonGame::sideChange(unsigned int mSideNumber)
1245
1245
mustChangeSides = false ;
1246
1246
1247
1247
playSoundOverride (levelStatus.levelUpSound );
1248
- runLuaFunctionIfExists< void > (" onIncrement" );
1248
+ runVoidLuaFunctionIfExists (" onIncrement" );
1249
1249
}
1250
1250
1251
1251
[[nodiscard]] bool HexagonGame::shouldSaveScore ()
@@ -1345,7 +1345,7 @@ void HexagonGame::goToMenu(bool mSendScores, bool mError)
1345
1345
// onUnload.
1346
1346
if (!mError )
1347
1347
{
1348
- runLuaFunctionIfExists< void > (" onUnload" );
1348
+ runVoidLuaFunctionIfExists (" onUnload" );
1349
1349
}
1350
1350
1351
1351
if (fnGoToMenu)
@@ -1740,7 +1740,7 @@ void HexagonGame::setSides(unsigned int mSides)
1740
1740
void HexagonGame::performPlayerSwap (const bool mPlaySound )
1741
1741
{
1742
1742
player.playerSwap ();
1743
- runLuaFunctionIfExists< void > (" onCursorSwap" );
1743
+ runVoidLuaFunctionIfExists (" onCursorSwap" );
1744
1744
1745
1745
if (mPlaySound )
1746
1746
{
0 commit comments