smash unsmash and wait working

This commit is contained in:
David Markowitz
2025-03-31 22:00:53 -07:00
parent 0278123a0c
commit 5d061c0274
4 changed files with 62 additions and 6 deletions

View File

@@ -6442,4 +6442,18 @@ namespace GameMessages {
missionComponent->Progress(eMissionTaskType::TALK_TO_NPC, interactedObject->GetLOT(), interactedObject->GetObjectID());
missionComponent->Progress(eMissionTaskType::INTERACT, interactedObject->GetLOT(), interactedObject->GetObjectID());
}
void Smash::Serialize(RakNet::BitStream& stream) const {
stream.Write(bIgnoreObjectVisibility);
stream.Write(force);
stream.Write(ghostCapacity);
stream.Write(killerID);
}
void UnSmash::Serialize(RakNet::BitStream& stream) const {
stream.Write(builderID != LWOOBJID_EMPTY);
if (builderID != LWOOBJID_EMPTY) stream.Write(builderID);
stream.Write(duration != 3.0f);
if (builderID != 3.0f) stream.Write(duration);
}
}

View File

@@ -801,6 +801,26 @@ namespace GameMessages {
// Used only for multi-interaction, is of the enum type InteractionType
int multiInteractType{};
};
struct Smash : public GameMsg {
Smash() : GameMsg(MessageType::Game::SMASH) {}
void Serialize(RakNet::BitStream& stream) const;
bool bIgnoreObjectVisibility{};
bool force{};
float ghostCapacity{};
LWOOBJID killerID{};
};
struct UnSmash : public GameMsg {
UnSmash() : GameMsg(MessageType::Game::UN_SMASH) {}
void Serialize(RakNet::BitStream& stream) const;
LWOOBJID builderID{ LWOOBJID_EMPTY };
float duration{ 3.0f };
};
};
#endif // GAMEMESSAGES_H