Add FlagComponent and msg handlers

This commit is contained in:
David Markowitz
2025-01-20 02:53:21 -08:00
parent e4c2eecbc7
commit af2ba5b287
53 changed files with 781 additions and 486 deletions

View File

@@ -390,10 +390,15 @@ void Mission::Catchup() {
}
if (type == eMissionTaskType::PLAYER_FLAG) {
for (int32_t target : task->GetAllTargets()) {
const auto flag = GetCharacter()->GetPlayerFlag(target);
GameMessages::GetFlag getFlag{};
getFlag.target = entity->GetObjectID();
if (!flag) {
for (int32_t target : task->GetAllTargets()) {
getFlag.iFlagId = target;
getFlag.bFlag = false;
SEND_ENTITY_MSG(getFlag);
if (!getFlag.bFlag) {
continue;
}