From 88791418244fac4f32a0d821ff7d26e048611932 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Tue, 30 Jun 2020 15:00:01 +0000 Subject: [PATCH] Disable PRVM_64 until it can be developed further. Improves perf. in some cases git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12759 d7cf8633-e32d-0410-b094-e92efae38249 --- prvm_edict.c | 8 ++++---- qtypes.h | 14 +++++++++----- sv_phys.c | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/prvm_edict.c b/prvm_edict.c index dc639e3c..2720c2b9 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -450,14 +450,14 @@ static char *PRVM_ValueString (prvm_prog_t *prog, etype_t type, prvm_eval_t *val dpsnprintf (line, linelength, "%s()", PRVM_GetString(prog, f->s_name)); } else - dpsnprintf (line, linelength, "function%lli() (invalid!)", val->function); + dpsnprintf (line, linelength, "function %" PRVM_PRIi "() (invalid!)", val->function); break; case ev_field: def = PRVM_ED_FieldAtOfs ( prog, val->_int ); if (def != NULL) dpsnprintf (line, linelength, ".%s", PRVM_GetString(prog, def->s_name)); else - dpsnprintf (line, linelength, "field%lli (invalid!)", val->_int ); + dpsnprintf (line, linelength, "field%" PRVM_PRIi " (invalid!)", val->_int ); break; case ev_void: dpsnprintf (line, linelength, "void"); @@ -544,14 +544,14 @@ char *PRVM_UglyValueString (prvm_prog_t *prog, etype_t type, prvm_eval_t *val, c strlcpy (line, PRVM_GetString (prog, f->s_name), linelength); } else - dpsnprintf (line, linelength, "bad function %lli (invalid!)", val->function); + dpsnprintf (line, linelength, "bad function %" PRVM_PRIi " (invalid!)", val->function); break; case ev_field: def = PRVM_ED_FieldAtOfs ( prog, val->_int ); if (def != NULL) dpsnprintf (line, linelength, ".%s", PRVM_GetString(prog, def->s_name)); else - dpsnprintf (line, linelength, "field%lli (invalid!)", val->_int ); + dpsnprintf (line, linelength, "field %" PRVM_PRIi "(invalid!)", val->_int ); break; case ev_void: dpsnprintf (line, linelength, "void"); diff --git a/qtypes.h b/qtypes.h index 4c834a31..e385e286 100644 --- a/qtypes.h +++ b/qtypes.h @@ -29,15 +29,19 @@ typedef bool qboolean; // LadyHavoc: upgrade the prvm to double precision for better time values // LadyHavoc: to be enabled when bugs are worked out... -#define PRVM_64 +//#define PRVM_64 #ifdef PRVM_64 typedef double prvm_vec_t; -typedef long long prvm_int_t; -typedef unsigned long long prvm_uint_t; +typedef int64_t prvm_int_t; +typedef uint64_t prvm_uint_t; +#define PRVM_PRIi PRIi64 +#define PRVM_PRIu PRIu64 #else typedef float prvm_vec_t; -typedef int prvm_int_t; -typedef unsigned int prvm_uint_t; +typedef int32_t prvm_int_t; +typedef uint32_t prvm_uint_t; +#define PRVM_PRIi PRIi32 +#define PRVM_PRIu PRIu32 #endif typedef prvm_vec_t prvm_vec3_t[3]; diff --git a/sv_phys.c b/sv_phys.c index 9964c362..fcd37002 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -1983,7 +1983,7 @@ SV_Physics_Pusher static void SV_Physics_Pusher (prvm_edict_t *ent) { prvm_prog_t *prog = SVVM_prog; - double thinktime, oldltime, movetime; + prvm_vec_t thinktime, oldltime, movetime; oldltime = PRVM_serveredictfloat(ent, ltime); -- 2.39.2