]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
fix endposnudge
[xonotic/darkplaces.git] / clvm_cmds.c
index e10ab54dc89a9ef8d62b7d7d88b842136ba08ea7..756da39abb582a54b790c6eaf83d13e032399b1a 100644 (file)
@@ -162,6 +162,7 @@ static void VM_CL_sound (void)
        prvm_edict_t            *entity;
        float                           volume;
        float                           attenuation;
+       vec3_t                          org;
 
        VM_SAFEPARMCOUNT(5, VM_CL_sound);
 
@@ -189,7 +190,8 @@ static void VM_CL_sound (void)
                return;
        }
 
-       S_StartSound(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), channel, S_FindName(sample), entity->fields.client->origin, volume, attenuation);
+       CL_VM_GetEntitySoundOrigin(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), org);
+       S_StartSound(MAX_EDICTS + PRVM_NUM_FOR_EDICT(entity), channel, S_FindName(sample), org, volume, attenuation);
 }
 
 // #483 void(vector origin, string sample, float volume, float attenuation) pointsound