1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-05 01:10:22 +02:00

Send player damage to all clients and apply [brighten

This commit is contained in:
PilzAdam
2013-08-13 23:06:39 +02:00
parent 3ee8098708
commit 787b43b218
4 changed files with 45 additions and 20 deletions

View File

@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "filesys.h"
#include "mapblock.h"
#include "serverobject.h"
#include "genericobject.h"
#include "settings.h"
#include "profiler.h"
#include "log.h"
@ -3828,6 +3829,11 @@ void Server::SendPlayerHP(u16 peer_id)
assert(playersao);
playersao->m_hp_not_sent = false;
SendHP(m_con, peer_id, playersao->getHP());
// Send to other clients
std::string str = gob_cmd_punched(playersao->readDamage(), playersao->getHP());
ActiveObjectMessage aom(playersao->getId(), true, str);
playersao->m_messages_out.push_back(aom);
}
void Server::SendPlayerBreath(u16 peer_id)