mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Send player damage to all clients and apply [brighten
This commit is contained in:
parent
3ee8098708
commit
787b43b218
4 changed files with 45 additions and 20 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue