Commit f85ed10a authored by divverent's avatar divverent

use "%f" format for angles, prevents weird exponential stuff


git-svn-id: svn://svn.icculus.org/netradiant/trunk@172 61c419a2-8eb2-4b30-bcec-8cead039b335
parent 1c96ac9d
......@@ -58,7 +58,7 @@ inline void write_angle(float angle, Entity* entity)
else
{
char value[64];
sprintf(value, "%g", angle);
sprintf(value, "%f", angle);
entity->setKeyValue("angle", value);
}
}
......
......@@ -87,7 +87,7 @@ inline void write_angles(const Vector3& angles, Entity* entity)
}
else
{
sprintf(value, "%g %g %g", angles[1], angles[2], angles[0]);
sprintf(value, "%f %f %f", angles[1], angles[2], angles[0]);
entity->setKeyValue("angle", "");
entity->setKeyValue("angles", value);
}
......
......@@ -44,7 +44,7 @@ inline void read_origin(Vector3& origin, const char* value)
inline void write_origin(const Vector3& origin, Entity* entity, const char* key)
{
char value[64];
sprintf(value, "%g %g %g", origin[0], origin[1], origin[2]);
sprintf(value, "%f %f %f", origin[0], origin[1], origin[2]);
entity->setKeyValue(key, value);
}
......
......@@ -68,13 +68,13 @@ inline void write_scale(const Vector3& scale, Entity* entity)
if(scale[0] == scale[1] && scale[0] == scale[2])
{
sprintf(value, "%g", scale[0]);
sprintf(value, "%f", scale[0]);
entity->setKeyValue("modelscale_vec", "");
entity->setKeyValue("modelscale", value);
}
else
{
sprintf(value, "%g %g %g", scale[0], scale[1], scale[2]);
sprintf(value, "%f %f %f", scale[0], scale[1], scale[2]);
entity->setKeyValue("modelscale", "");
entity->setKeyValue("modelscale_vec", value);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment