mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-10-31 04:32:06 +00:00 
			
		
		
		
	add erase var helper for entity
This commit is contained in:
		| @@ -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; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Markowitz
					David Markowitz