summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorBlockMen <nmuelll@web.de>2014-04-12 13:50:22 +0200
committerBlockMen <nmuelll@web.de>2014-04-12 20:04:12 +0200
commit8b02a015eb7630c25e255ffe400bb714d023609b (patch)
tree42a7d9bd217a04574767f9c202536bdebafa53c3 /src/server.cpp
parentc0ab09af747fc431dfb459ede30788cb9cd1c56b (diff)
downloadminetest-8b02a015eb7630c25e255ffe400bb714d023609b.tar.gz
minetest-8b02a015eb7630c25e255ffe400bb714d023609b.tar.bz2
minetest-8b02a015eb7630c25e255ffe400bb714d023609b.zip
Use integers instead of float values
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server.cpp b/src/server.cpp
index cbb9f427f..ebde0d9ef 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -3484,15 +3484,15 @@ void Server::SendMovePlayer(u16 peer_id)
m_clients.send(peer_id, 0, data, true);
}
-void Server::SendLocalPlayerAnimations(u16 peer_id, v2f animation_frames[4], f32 animation_speed)
+void Server::SendLocalPlayerAnimations(u16 peer_id, v2s32 animation_frames[4], f32 animation_speed)
{
std::ostringstream os(std::ios_base::binary);
writeU16(os, TOCLIENT_LOCAL_PLAYER_ANIMATIONS);
- writeV2F1000(os, animation_frames[0]);
- writeV2F1000(os, animation_frames[1]);
- writeV2F1000(os, animation_frames[2]);
- writeV2F1000(os, animation_frames[3]);
+ writeV2S32(os, animation_frames[0]);
+ writeV2S32(os, animation_frames[1]);
+ writeV2S32(os, animation_frames[2]);
+ writeV2S32(os, animation_frames[3]);
writeF1000(os, animation_speed);
// Make data buffer
@@ -4610,7 +4610,7 @@ void Server::hudSetHotbarSelectedImage(Player *player, std::string name) {
SendHUDSetParam(player->peer_id, HUD_PARAM_HOTBAR_SELECTED_IMAGE, name);
}
-bool Server::setLocalPlayerAnimations(Player *player, v2f animation_frames[4], f32 frame_speed)
+bool Server::setLocalPlayerAnimations(Player *player, v2s32 animation_frames[4], f32 frame_speed)
{
if (!player)
return false;