summaryrefslogtreecommitdiff
path: root/src/client/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r--src/client/client.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp
index 3ba69333a..41893fcba 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -437,7 +437,7 @@ void Client::step(float dtime)
ClientEnvEvent envEvent = m_env.getClientEnvEvent();
if (envEvent.type == CEE_PLAYER_DAMAGE) {
- u8 damage = envEvent.player_damage.amount;
+ u16 damage = envEvent.player_damage.amount;
if (envEvent.player_damage.send_to_server)
sendDamage(damage);
@@ -1213,9 +1213,9 @@ void Client::sendChangePassword(const std::string &oldpassword,
}
-void Client::sendDamage(u8 damage)
+void Client::sendDamage(u16 damage)
{
- NetworkPacket pkt(TOSERVER_DAMAGE, sizeof(u8));
+ NetworkPacket pkt(TOSERVER_DAMAGE, sizeof(u16));
pkt << damage;
Send(&pkt);
}
@@ -1515,17 +1515,6 @@ void Client::typeChatMessage(const std::wstring &message)
// Send to others
sendChatMessage(message);
-
- // Show locally
- if (message[0] != L'/') {
- // compatibility code
- if (m_proto_ver < 29) {
- LocalPlayer *player = m_env.getLocalPlayer();
- assert(player);
- std::wstring name = narrow_to_wide(player->getName());
- pushToChatQueue(new ChatMessage(CHATMESSAGE_TYPE_NORMAL, message, name));
- }
- }
}
void Client::addUpdateMeshTask(v3s16 p, bool ack_to_server, bool urgent)