summaryrefslogtreecommitdiff
path: root/src/being/crazymoves.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/being/crazymoves.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadmv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/being/crazymoves.cpp')
-rw-r--r--src/being/crazymoves.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/being/crazymoves.cpp b/src/being/crazymoves.cpp
index 34441d6e6..3eb3fd3f4 100644
--- a/src/being/crazymoves.cpp
+++ b/src/being/crazymoves.cpp
@@ -738,17 +738,17 @@ void CrazyMoves::crazyMoveAe()
if (emo == '?')
{
srand(tick_time);
- emoteId = static_cast<unsigned char>(
+ emoteId = CAST_U8(
1 + (rand() % EmoteDB::size()));
}
else
{
if (emo >= '0' && emo <= '9')
- emoteId = static_cast<unsigned char>(emo - '0' + 1);
+ emoteId = CAST_U8(emo - '0' + 1);
else if (emo >= 'a' && emo <= 'z')
- emoteId = static_cast<unsigned char>(emo - 'a' + 11);
+ emoteId = CAST_U8(emo - 'a' + 11);
else if (emo >= 'A' && emo <= 'Z')
- emoteId = static_cast<unsigned char>(emo - 'A' + 37);
+ emoteId = CAST_U8(emo - 'A' + 37);
}
if (mMoveProgram[settings.crazyMoveState - 1] == 'e')
localPlayer->emote(emoteId);