guiismiti
Well-Known Member
- Joined
- May 19, 2014
- Messages
- 315
- Solutions
- 3
- Reaction score
- 68
Hello!
Clients of version 11+ have an issue with ProtocolGame::sendCreatureHealth (TFS 1.3).
WRONG behavior (clients 11+) - monster is killed with the last hit, but name and health bar are still showing, until the corpse is created:
RIGHT behavior (client 10) - name and health bar stop showing with the last hit, before the monster is removed and the corpse created:
God using 'hide' (with setHiddenHealth) in clients 11+:
Magicthrower in clients 11+:
Has anybody managed to solve this?
Or, has anybody got an idea on how to solve this?
Extra info:
Monsters don't hit the ground immediately when killed because the function that checks for killed monsters is called with a think interval, and not directly after the last hit - (game.cpp) Game::checkCreatures
Clients of version 11+ have an issue with ProtocolGame::sendCreatureHealth (TFS 1.3).
- it causes the name and health bar of killed monsters to still show after the last hit and before the corpse is created;
- name and health bar of gods using 'hide' (with setHiddenHealth) can still be seen by players;
- monsters with hidden health (e. g. magicthrowers) can still be seen by players.
C++:
void ProtocolGame::sendCreatureHealth(const Creature* creature)
{
NetworkMessage msg;
msg.addByte(0x8C);
msg.add<uint32_t>(creature->getID());
if (creature->isHealthHidden()) {
msg.addByte(0x00);
} else {
msg.addByte(std::ceil((static_cast<double>(creature->getHealth()) / std::max<int32_t>(creature->getMaxHealth(), 1)) * 100));
}
writeToOutputBuffer(msg);
}
WRONG behavior (clients 11+) - monster is killed with the last hit, but name and health bar are still showing, until the corpse is created:
RIGHT behavior (client 10) - name and health bar stop showing with the last hit, before the monster is removed and the corpse created:
God using 'hide' (with setHiddenHealth) in clients 11+:
Magicthrower in clients 11+:
Has anybody managed to solve this?
Or, has anybody got an idea on how to solve this?
Extra info:
Monsters don't hit the ground immediately when killed because the function that checks for killed monsters is called with a think interval, and not directly after the last hit - (game.cpp) Game::checkCreatures