mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-11-04 06:32:00 +00:00 
			
		
		
		
	Use epsilon comparison
This commit is contained in:
		@@ -312,7 +312,9 @@ foundComponent:
 | 
			
		||||
 | 
			
		||||
	if (physicsComponent) speed = physicsComponent->speed;
 | 
			
		||||
 | 
			
		||||
	if (speed == -1.0f) speed = 10.0f;
 | 
			
		||||
	float delta = fabs(speed) - 1.0f;
 | 
			
		||||
 | 
			
		||||
	if (delta <= std::numeric_limits<float>::epsilon()) speed = 10.0f;
 | 
			
		||||
 | 
			
		||||
	m_PhysicsSpeedCache[lot] = speed;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user