Code: Select all
if (stat_cameras > 0)
{
R_SetView(VF_ORIGIN_X, stat_origin_x);
R_SetView(VF_ORIGIN_Y, stat_origin_y);
R_SetView(VF_ORIGIN_Z, stat_origin_z);
R_SetView(VF_ANGLES_X, stat_angles_x);
R_SetView(VF_ANGLES_Y, stat_angles_y);
R_SetView(VF_ANGLES_Z, stat_angles_z);
R_AddEntities(MASK_NORMAL | MASK_ENGINE);
}
this is perfect, but when I espawned a camera from the beginning (without toggle it) from playerprethink every sounds are playing, as if the listener were the world without origin (not '0 0 0', i tested puting different ambient sounds, and normal sounds in this location). Every sounds are listened from the worl without an origin or angle changes, and after if i put in console "restart" the cameras works perfectly and the sounds works fine :? . but if the player dies and after respawn the problem persists, my question is: is there a way to cahnge the origin of the entity "listener" of the sounds in CSQC?
How?