Skip to content

Commit

Permalink
Add flag notes for entity_update:0x29
Browse files Browse the repository at this point in the history
  • Loading branch information
zach2good committed Oct 22, 2023
1 parent 923a58e commit 005041c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/map/packets/entity_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ void CEntityUpdatePacket::updateWith(CBaseEntity* PEntity, ENTITYUPDATE type, ui
ref<uint8>(0x28) |= 0x40;
}

// Other flag options for 0x29:
// 0x08: Sword and Shield (Belligerency etc.)
// 0x20: Two heads butting on red background
ref<uint8>(0x29) = static_cast<uint8>(PEntity->allegiance);
ref<uint8>(0x2B) = PEntity->namevis;
}
Expand Down Expand Up @@ -167,6 +170,10 @@ void CEntityUpdatePacket::updateWith(CBaseEntity* PEntity, ENTITYUPDATE type, ui
ref<uint8>(0x28) |= PMob->StatusEffectContainer->HasStatusEffect(EFFECT_TERROR) ? 0x10 : 0x00;
ref<uint8>(0x28) |= PMob->health.hp > 0 && PMob->animation == ANIMATION_DEATH ? 0x08 : 0;
ref<uint8>(0x28) |= PMob->status == STATUS_TYPE::NORMAL && PMob->objtype == TYPE_MOB ? 0x40 : 0; // Make the entity triggerable if a mob and normal status

// Other flag options for 0x29:
// 0x08: Sword and Shield (Belligerency etc.)
// 0x20: Two heads butting on red background
ref<uint8>(0x29) = static_cast<uint8>(PEntity->allegiance);
ref<uint8>(0x2B) = PEntity->namevis;
}
Expand Down

0 comments on commit 005041c

Please sign in to comment.