mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-05-30 21:51:33 +00:00
add erase var helper for entity
This commit is contained in:
parent
abd978c348
commit
82507e642a
@ -2166,3 +2166,12 @@ void Entity::SetRespawnRot(const NiQuaternion& rotation) {
|
||||
auto* characterComponent = GetComponent<CharacterComponent>();
|
||||
if (characterComponent) characterComponent->SetRespawnRot(rotation);
|
||||
}
|
||||
|
||||
void Entity::EraseVar(const std::u16string& name) {
|
||||
for (auto it = m_Settings.begin(); it != m_Settings.end(); ++it) {
|
||||
if ((*it)->GetKey() == name) {
|
||||
m_Settings.erase(it);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -299,6 +299,7 @@ public:
|
||||
// Scale will only be communicated to the client when the construction packet is sent
|
||||
void SetScale(const float scale) { m_Scale = scale; };
|
||||
|
||||
void EraseVar(const std::u16string& name);
|
||||
protected:
|
||||
LWOOBJID m_ObjectID;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user