summaryrefslogtreecommitdiff
path: root/src/actionmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-25 22:03:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-25 22:03:28 +0300
commitd670395fff93f805b666e0cc4cc56cdb880e0bba (patch)
treee7949649a7c0568b3b238c91092f60606a495f9f /src/actionmanager.cpp
parent7d6d3d997614e8e76ca9044ca8ed5a81d3b14a95 (diff)
downloadmanaplus-d670395fff93f805b666e0cc4cc56cdb880e0bba.tar.gz
manaplus-d670395fff93f805b666e0cc4cc56cdb880e0bba.tar.bz2
manaplus-d670395fff93f805b666e0cc4cc56cdb880e0bba.tar.xz
manaplus-d670395fff93f805b666e0cc4cc56cdb880e0bba.zip
Use all methods in gamemodifiers as static.
Diffstat (limited to 'src/actionmanager.cpp')
-rw-r--r--src/actionmanager.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 567bb0647..94ff787a2 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -91,18 +91,14 @@
#define impHandler0(name) bool name(const InputEvent &event A_UNUSED)
#define callYellowBar(name) \
- if (modifiers) \
- { \
- modifiers->name(!inputManager.isActionActive( \
- InputAction::STOP_ATTACK)); \
- return true; \
- } \
- return false;
+ GameModifiers::name(!inputManager.isActionActive( \
+ InputAction::STOP_ATTACK)); \
+ return true;
#define callYellowBarCond(name) \
- if (modifiers && !settings.disableGameModifiers) \
+ if (!settings.disableGameModifiers) \
{ \
- modifiers->name(!inputManager.isActionActive( \
+ GameModifiers::name(!inputManager.isActionActive( \
InputAction::STOP_ATTACK)); \
return true; \
} \
@@ -563,7 +559,7 @@ impHandler0(changeGameModifier)
{
if (player_node)
{
- modifiers->changeGameModifiers();
+ GameModifiers::changeGameModifiers();
return true;
}
return false;
@@ -579,8 +575,7 @@ impHandler0(changeAudio)
impHandler0(away)
{
- if (modifiers)
- modifiers->changeAwayMode();
+ GameModifiers::changeAwayMode();
if (player_node)
{
player_node->updateStatus();