Fix #7188: check the validity of command callback for scripts (#7701)

This commit is contained in:
glx22
2019-09-07 18:37:01 +02:00
committed by Charles Pigott
parent da086a3fde
commit 6369e0693d
23 changed files with 105 additions and 36 deletions

View File

@@ -51,7 +51,7 @@
static int _rename_id = 1;
static int _rename_what = -1;
void CcGiveMoney(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcGiveMoney(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
#ifdef ENABLE_NETWORK
if (result.Failed() || !_settings_game.economy.give_money) return;
@@ -119,7 +119,7 @@ bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyl
}
void CcPlaySound_EXPLOSION(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcPlaySound_EXPLOSION(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_12_EXPLOSION, tile);
}