mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-11-03 22:21:59 +00:00 
			
		
		
		
	Change destroyable component validator to properly check friends
This commit is contained in:
		@@ -532,12 +532,12 @@ bool DestroyableComponent::CheckValidity(const LWOOBJID target, const bool ignor
 | 
			
		||||
		return true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Get if the target entity is an enemy
 | 
			
		||||
	// Get if the target entity is an enemy and friend
 | 
			
		||||
	bool isEnemy = IsEnemy(targetEntity);
 | 
			
		||||
	bool isFriend = IsFriend(targetEntity);
 | 
			
		||||
 | 
			
		||||
	// Return true if the target type matches what we are targeting
 | 
			
		||||
	// Friends are entities who are not enemies
 | 
			
		||||
	return (isEnemy && targetEnemy) || (!isEnemy && targetFriend);
 | 
			
		||||
	return (isEnemy && targetEnemy) || (isFriend && targetFriend);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user