]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
In findfloat and findchainfloat, use prvm_vec_t like the rest of the VM
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 2 Jun 2020 14:03:07 +0000 (14:03 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 2 Jun 2020 14:03:07 +0000 (14:03 +0000)
This caused Xonotic vehicles to delete every CSQC entity on the map due
to a bad comparison between a double and a float.

Big, big thanks to Mario for finding this, yet again.

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

prvm_cmds.c

index ec68d188628c88dbd9fe8722c994ef2b8ef39859..f947766ae6e9a56040f0643cde7a49127cb8592b 100644 (file)
@@ -1080,7 +1080,7 @@ void VM_findfloat(prvm_prog_t *prog)
 {
        int             e;
        int             f;
-       float   s;
+       prvm_vec_t      s;
        prvm_edict_t    *ed;
 
        VM_SAFEPARMCOUNT(3,VM_findfloat);
@@ -1173,7 +1173,7 @@ void VM_findchainfloat(prvm_prog_t *prog)
 {
        int             i;
        int             f;
-       float   s;
+       prvm_vec_t      s;
        prvm_edict_t    *ent, *chain;
        int chainfield;