Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "framerate_type.h"
|
||||
#include "guitimer_func.h"
|
||||
#include "screenshot_gui.h"
|
||||
#include "misc_cmd.h"
|
||||
|
||||
#include "widgets/toolbar_widget.h"
|
||||
|
||||
@@ -265,7 +266,7 @@ static CallBackFunction ToolbarPauseClick(Window *w)
|
||||
{
|
||||
if (_networking && !_network_server) return CBF_NONE; // only server can pause the game
|
||||
|
||||
if (DoCommandP(CMD_PAUSE, 0, PM_PAUSED_NORMAL, _pause_mode == PM_UNPAUSED)) {
|
||||
if (Command<CMD_PAUSE>::Post(0, PM_PAUSED_NORMAL, _pause_mode == PM_UNPAUSED, {})) {
|
||||
if (_settings_client.sound.confirm) SndPlayFx(SND_15_BEEP);
|
||||
}
|
||||
return CBF_NONE;
|
||||
|
Reference in New Issue
Block a user