]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
fix coronas for "realtime darks"
[xonotic/darkplaces.git] / clvm_cmds.c
index 77456632aeda8d4b9dcfc4550138bb5c25942d96..f11251bc02e86a80a2aeb98e63da0f6320111fda 100644 (file)
@@ -2232,12 +2232,19 @@ int CL_GetExtendedTagInfo (prvm_edict_t *e, int tagindex, int *parentindex, cons
        return 1;
 }
 
+int CL_GetPitchSign(prvm_edict_t *ent)
+{
+       dp_model_t *model;
+       if ((model = CL_GetModelFromEdict(ent)) && model->type == mod_alias)
+               return -1;
+       return 1;
+}
+
 void CL_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatrix)
 {
        prvm_eval_t *val;
        float scale;
        float pitchsign = 1;
-       dp_model_t *model;
 
        scale = 1;
        val = PRVM_EDICTFIELDVALUE(ent, prog->fieldoffsets.scale);
@@ -2249,8 +2256,7 @@ void CL_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri
                Matrix4x4_CreateFromQuakeEntity(out, cl.csqc_origin[0], cl.csqc_origin[1], cl.csqc_origin[2], cl.csqc_angles[0], cl.csqc_angles[1], cl.csqc_angles[2], scale * cl_viewmodel_scale.value);
        else
        {
-               if ((model = CL_GetModelFromEdict(ent)) && model->type == mod_alias)
-                       pitchsign = -1;
+               pitchsign = CL_GetPitchSign(ent);
                Matrix4x4_CreateFromQuakeEntity(out, ent->fields.client->origin[0], ent->fields.client->origin[1], ent->fields.client->origin[2], pitchsign * ent->fields.client->angles[0], ent->fields.client->angles[1], ent->fields.client->angles[2], scale);
        }
 }
@@ -4159,8 +4165,8 @@ VM_CL_ParticleThemeSave,          // #525 void() particlethemesave, void(float theme) pa
 VM_CL_ParticleThemeFree,               // #526 void() particlethemefree (DP_CSQC_SPAWNPARTICLE)
 VM_CL_SpawnParticle,                   // #527 float(vector org, vector vel, [float theme]) particle (DP_CSQC_SPAWNPARTICLE)
 VM_CL_SpawnParticleDelayed,            // #528 float(vector org, vector vel, float delay, float collisiondelay, [float theme]) delayedparticle (DP_CSQC_SPAWNPARTICLE)
-NULL,                                                  // #529
-NULL,                                                  // #530
+VM_loadfromdata,                               // #529
+VM_loadfromfile,                               // #530
 NULL,                                                  // #531
 NULL,                                                  // #532
 NULL,                                                  // #533
@@ -4235,15 +4241,15 @@ NULL,                                                   // #601
 NULL,                                                  // #602
 NULL,                                                  // #603
 NULL,                                                  // #604
-NULL,                                                  // #605
-NULL,                                                  // #606
-NULL,                                                  // #607
+VM_callfunction,                               // #605
+VM_writetofile,                                        // #606
+VM_isfunction,                                 // #607
 NULL,                                                  // #608
 NULL,                                                  // #609
 NULL,                                                  // #610
 NULL,                                                  // #611
 NULL,                                                  // #612
-NULL,                                                  // #613
+VM_parseentitydata,                            // #613
 NULL,                                                  // #614
 NULL,                                                  // #615
 NULL,                                                  // #616