Skip to content

Commit 6f7e9fc

Browse files
committed
improve element.position OOP for radarareas
(cherry picked from commit 3270ac4)
1 parent edda2df commit 6f7e9fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

MTA10_Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,8 +1636,10 @@ int CLuaElementDefs::setElementPosition ( lua_State* luaVM )
16361636
if ( !argStream.HasErrors () && pElement->GetType () == CElement::RADAR_AREA )
16371637
{
16381638
// radar areas only take x and y
1639-
argStream.ReadNumber ( vecPosition.fX );
1640-
argStream.ReadNumber ( vecPosition.fY );
1639+
CVector2D vecRadarPos;
1640+
argStream.ReadVector2D ( vecRadarPos );
1641+
vecPosition.fX = vecRadarPos.fX;
1642+
vecPosition.fY = vecRadarPos.fY;
16411643
}
16421644
else
16431645
{

0 commit comments

Comments
 (0)