Normalize dir parameter when copying to clipboard
parent
974b6efad5
commit
514829de60
|
@ -981,10 +981,13 @@ bool CRobotMain::ProcessEvent(Event &event)
|
||||||
{
|
{
|
||||||
CLevelParserLine line("CreateObject");
|
CLevelParserLine line("CreateObject");
|
||||||
line.AddParam("type", MakeUnique<CLevelParserParam>(obj->GetType()));
|
line.AddParam("type", MakeUnique<CLevelParserParam>(obj->GetType()));
|
||||||
|
|
||||||
Math::Vector pos = obj->GetPosition()/g_unit;
|
Math::Vector pos = obj->GetPosition()/g_unit;
|
||||||
pos.y = 0.0f;
|
pos.y = 0.0f;
|
||||||
line.AddParam("pos", MakeUnique<CLevelParserParam>(pos));
|
line.AddParam("pos", MakeUnique<CLevelParserParam>(pos));
|
||||||
line.AddParam("dir", MakeUnique<CLevelParserParam>(obj->GetRotationY()));
|
|
||||||
|
float dir = Math::NormAngle(obj->GetRotationY()) / Math::PI;
|
||||||
|
line.AddParam("dir", MakeUnique<CLevelParserParam>(dir));
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << line;
|
ss << line;
|
||||||
|
|
Loading…
Reference in New Issue