]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
changed PRVM_ValueString (used by prvm_global, prvm_globals, prvm_edict,
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 19 Apr 2012 11:48:07 +0000 (11:48 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 19 Apr 2012 11:48:07 +0000 (11:48 +0000)
prvm_edicts) to print floats and vectors with more precision (using the
FLOAT_LOSSLESS_FORMAT and VECTOR_LOSSLESS_FORMAT macros previously added)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11800 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c

index 82392bbf8921b8082e0160566c8f5575bdddfcad..307f3129be85ac6d005edbcbf45665ef161c6803 100644 (file)
@@ -442,11 +442,11 @@ static char *PRVM_ValueString (prvm_prog_t *prog, etype_t type, prvm_eval_t *val
                break;
        case ev_float:
                // LordHavoc: changed from %5.1f to %10.4f
-               dpsnprintf (line, linelength, "%10.4f", val->_float);
+               dpsnprintf (line, linelength, FLOAT_LOSSLESS_FORMAT, val->_float);
                break;
        case ev_vector:
                // LordHavoc: changed from %5.1f to %10.4f
-               dpsnprintf (line, linelength, "'%10.4f %10.4f %10.4f'", val->vector[0], val->vector[1], val->vector[2]);
+               dpsnprintf (line, linelength, "'" VECTOR_LOSSLESS_FORMAT "'", val->vector[0], val->vector[1], val->vector[2]);
                break;
        case ev_pointer:
                dpsnprintf (line, linelength, "pointer");