mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Fix #198 - dismount packet is now sent if unequipping a vehicle
This commit is contained in:
parent
80d965944c
commit
f0e21b5051
@ -301,8 +301,18 @@ static void itemMoveHandler(CNSocket* sock, CNPacketData* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// unequip vehicle if equip slot 8 is 0
|
// unequip vehicle if equip slot 8 is 0
|
||||||
if (plr->Equip[8].iID == 0)
|
if (plr->Equip[8].iID == 0 && plr->iPCState & 8) {
|
||||||
plr->iPCState = 0;
|
INITSTRUCT(sP_FE2CL_PC_VEHICLE_OFF_SUCC, response);
|
||||||
|
sock->sendPacket(response, P_FE2CL_PC_VEHICLE_OFF_SUCC);
|
||||||
|
|
||||||
|
// send to other players
|
||||||
|
plr->iPCState &= ~8;
|
||||||
|
INITSTRUCT(sP_FE2CL_PC_STATE_CHANGE, response2);
|
||||||
|
response2.iPC_ID = plr->iID;
|
||||||
|
response2.iState = plr->iPCState;
|
||||||
|
|
||||||
|
PlayerManager::sendToViewable(sock, response2, P_FE2CL_PC_STATE_CHANGE);
|
||||||
|
}
|
||||||
|
|
||||||
// send equip event to other players
|
// send equip event to other players
|
||||||
PlayerManager::sendToViewable(sock, equipChange, P_FE2CL_PC_EQUIP_CHANGE);
|
PlayerManager::sendToViewable(sock, equipChange, P_FE2CL_PC_EQUIP_CHANGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user