Skip to content

Commit ca0a451

Browse files
committed
Review
1 parent a927230 commit ca0a451

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ CClientBuilding* CLuaBuildingDefs::CreateBuilding(lua_State* const luaVM, std::u
4949
throw std::invalid_argument("Position is outside of game world");
5050

5151
CVector rot{rotX.value_or(0), rotY.value_or(0), rotZ.value_or(0)};
52-
if (rot.fX != 0 || rot.fY != 0 || rot.fZ != 0)
52+
float epsilon = std::numeric_limits<float>::epsilon();
53+
if (std::abs(rot.fX) < epsilon || std::abs(rot.fY) < epsilon || std::abs(rot.fZ) < epsilon)
5354
ConvertDegreesToRadians(rot);
5455

5556
m_pBuildingManager->ResizePoolIfNeeds();

0 commit comments

Comments
 (0)