]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Disable PRVM_64 until it can be developed further. Improves perf. in some cases
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 30 Jun 2020 15:00:01 +0000 (15:00 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 30 Jun 2020 15:00:01 +0000 (15:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12759 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c
qtypes.h
sv_phys.c

index dc639e3ca0040880e890d18ebfb35cd010a864dd..2720c2b94c0e88fc751fdbab02055bbc77abb968 100644 (file)
@@ -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");
index 4c834a312a5afb1c7d3399426c9b55575d765fa6..e385e286a7dffc73d8541b0e040f78dd683ae75d 100644 (file)
--- 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];
 
index 9964c362f0d0dada04d617f81ed434641eea31eb..fcd37002b92a0f5bb311c0f2e65c54fa32d69ff1 100644 (file)
--- 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);