mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-25 13:10:31 +00:00
Use the right packet for when a player falls out of the world
SUDDEN_DEAD is more appropriate than goo damage for this. Also made it so other players can see when someone does a /health 0, for comedic effect.
This commit is contained in:
@@ -1002,8 +1002,16 @@ void MobManager::playerTick(CNServer *serv, time_t currTime) {
|
||||
}
|
||||
|
||||
// check if the player has fallen out of the world
|
||||
if (plr->z < -30000)
|
||||
dealGooDamage(sock, PC_MAXHEALTH(36) * 2);
|
||||
if (plr->z < -30000) {
|
||||
INITSTRUCT(sP_FE2CL_PC_SUDDEN_DEAD, dead);
|
||||
|
||||
dead.iPC_ID = plr->iID;
|
||||
dead.iDamage = plr->HP;
|
||||
dead.iHP = plr->HP = 0;
|
||||
|
||||
sock->sendPacket((void*)&dead, P_FE2CL_PC_SUDDEN_DEAD, sizeof(sP_FE2CL_PC_SUDDEN_DEAD));
|
||||
PlayerManager::sendToViewable(sock, (void*)&dead, P_FE2CL_PC_SUDDEN_DEAD, sizeof(sP_FE2CL_PC_SUDDEN_DEAD));
|
||||
}
|
||||
|
||||
if (transmit) {
|
||||
INITSTRUCT(sP_FE2CL_REP_PC_TICK, pkt);
|
||||
|
||||
Reference in New Issue
Block a user