Fix racing imagination loss on death (#1006)

* Fix imagination on death

* Fix defaults

* Fix visuals
This commit is contained in:
David Markowitz
2023-03-05 12:34:59 -08:00
committed by GitHub
parent 9d65d871d0
commit 49047a267b
4 changed files with 85 additions and 34 deletions

View File

@@ -4396,6 +4396,36 @@ void GameMessages::SendRacingResetPlayerToLastReset(LWOOBJID objectId, LWOOBJID
SEND_PACKET;
}
void GameMessages::SendVehicleStopBoost(Entity* targetEntity, const SystemAddress& playerSysAddr, bool affectPassive) {
CBITSTREAM;
CMSGHEADER;
bitStream.Write(targetEntity->GetObjectID());
bitStream.Write(GAME_MSG::GAME_MSG_VEHICLE_STOP_BOOST);
bitStream.Write(affectPassive);
SEND_PACKET_BROADCAST;
}
void GameMessages::SendSetResurrectRestoreValues(Entity* targetEntity, int32_t armorRestore, int32_t healthRestore, int32_t imaginationRestore) {
CBITSTREAM;
CMSGHEADER;
bitStream.Write(targetEntity->GetObjectID());
bitStream.Write(GAME_MSG::GAME_MSG_SET_RESURRECT_RESTORE_VALUES);
bitStream.Write(armorRestore != -1);
if (armorRestore != -1) bitStream.Write(armorRestore);
bitStream.Write(healthRestore != -1);
if (healthRestore != -1) bitStream.Write(healthRestore);
bitStream.Write(imaginationRestore != -1);
if (imaginationRestore != -1) bitStream.Write(imaginationRestore);
SEND_PACKET_BROADCAST;
}
void GameMessages::SendNotifyRacingClient(LWOOBJID objectId, int32_t eventType, int32_t param1, LWOOBJID paramObj, std::u16string paramStr, LWOOBJID singleClient, const SystemAddress& sysAddr) {
CBITSTREAM;