]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
fix a few more redundancies with PRVM_64
[xonotic/darkplaces.git] / clvm_cmds.c
index c765ca252f8444245890ea55bfac499c17da5702..bbb29e248a5a34ce2662de30c95c58ffd8fe8e1a 100644 (file)
@@ -1602,7 +1602,7 @@ static void VM_CL_getplayerkey (prvm_prog_t *prog)
                        {
                                vec3_t origin;
                                Matrix4x4_OriginFromMatrix(&e->render.matrix, origin);
-                               dpsnprintf(t, sizeof(t), "%.9g %.9g %.9g", origin[0], origin[1], origin[2]);
+                               dpsnprintf(t, sizeof(t), VECTOR_LOSSLESS_FORMAT, origin[0], origin[1], origin[2]);
                        }
                }
        if(!t[0])
@@ -1884,10 +1884,14 @@ static void VM_CL_copyentity (prvm_prog_t *prog)
 // #404 void(vector org, string modelname, float startframe, float endframe, float framerate) effect (DP_SV_EFFECT)
 static void VM_CL_effect (prvm_prog_t *prog)
 {
+#if 1
+       Con_Printf("WARNING: VM_CL_effect not implemented\n"); // FIXME: this needs to take modelname not modelindex, the csqc defs has it as string and so it shall be
+#else
        vec3_t org;
        VM_SAFEPARMCOUNT(5, VM_CL_effect);
        VectorCopy(PRVM_G_VECTOR(OFS_PARM0), org);
        CL_Effect(org, (int)PRVM_G_FLOAT(OFS_PARM1), (int)PRVM_G_FLOAT(OFS_PARM2), (int)PRVM_G_FLOAT(OFS_PARM3), PRVM_G_FLOAT(OFS_PARM4));
+#endif
 }
 
 // #405 void(vector org, vector velocity, float howmany) te_blood (DP_TE_BLOOD)
@@ -2732,7 +2736,7 @@ static void VM_CL_ParticleThemeToGlobals(vmparticletheme_t *theme, prvm_prog_t *
        // VorteX: int only can store 0-255, not 0-256 which means 0 - 0,99609375...
        VectorSet(PRVM_clientglobalvector(particle_color1), (theme->color1 >> 16) & 0xFF, (theme->color1 >> 8) & 0xFF, (theme->color1 >> 0) & 0xFF);
        VectorSet(PRVM_clientglobalvector(particle_color2), (theme->color2 >> 16) & 0xFF, (theme->color2 >> 8) & 0xFF, (theme->color2 >> 0) & 0xFF);
-       PRVM_clientglobalfloat(particle_tex) = (float)theme->tex;
+       PRVM_clientglobalfloat(particle_tex) = (prvm_vec_t)theme->tex;
        PRVM_clientglobalfloat(particle_size) = theme->size;
        PRVM_clientglobalfloat(particle_sizeincrease) = theme->sizeincrease;
        PRVM_clientglobalfloat(particle_alpha) = theme->alpha/256;
@@ -2748,9 +2752,9 @@ static void VM_CL_ParticleThemeToGlobals(vmparticletheme_t *theme, prvm_prog_t *
        PRVM_clientglobalfloat(particle_stretch) = theme->stretch;
        VectorSet(PRVM_clientglobalvector(particle_staincolor1), ((int)theme->staincolor1 >> 16) & 0xFF, ((int)theme->staincolor1 >> 8) & 0xFF, ((int)theme->staincolor1 >> 0) & 0xFF);
        VectorSet(PRVM_clientglobalvector(particle_staincolor2), ((int)theme->staincolor2 >> 16) & 0xFF, ((int)theme->staincolor2 >> 8) & 0xFF, ((int)theme->staincolor2 >> 0) & 0xFF);
-       PRVM_clientglobalfloat(particle_staintex) = (float)theme->staintex;
-       PRVM_clientglobalfloat(particle_stainalpha) = (float)theme->stainalpha/256;
-       PRVM_clientglobalfloat(particle_stainsize) = (float)theme->stainsize;
+       PRVM_clientglobalfloat(particle_staintex) = (prvm_vec_t)theme->staintex;
+       PRVM_clientglobalfloat(particle_stainalpha) = (prvm_vec_t)theme->stainalpha/256;
+       PRVM_clientglobalfloat(particle_stainsize) = (prvm_vec_t)theme->stainsize;
        PRVM_clientglobalfloat(particle_delayspawn) = theme->delayspawn;
        PRVM_clientglobalfloat(particle_delaycollision) = theme->delaycollision;
        PRVM_clientglobalfloat(particle_angle) = theme->angle;