mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-18 19:10:37 +00:00
engine: fix brush model sound spatialization
This commit is contained in:
parent
a1c948e591
commit
c50f73b892
@ -1381,10 +1381,16 @@ qboolean CL_GetEntitySpatialization( channel_t *ch )
|
||||
if( !ent || !ent->model || ent->curstate.messagenum != cl.parsecount )
|
||||
return valid_origin;
|
||||
|
||||
VectorCopy( ent->origin, ch->origin );
|
||||
|
||||
// setup origin
|
||||
if( ent->model->type == mod_brush )
|
||||
VectorAverage( ent->curstate.mins, ent->curstate.maxs, ch->origin );
|
||||
{
|
||||
VectorAverage( ent->model->mins, ent->model->maxs, ch->origin );
|
||||
VectorAdd( ent->origin, ch->origin, ch->origin );
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorCopy( ent->origin, ch->origin );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1402,10 +1408,15 @@ qboolean CL_GetMovieSpatialization( rawchan_t *ch )
|
||||
return valid_origin;
|
||||
|
||||
// setup origin
|
||||
VectorCopy( ent->origin, ch->origin );
|
||||
|
||||
if( ent->model->type == mod_brush )
|
||||
VectorAverage( ent->curstate.mins, ent->curstate.maxs, ch->origin );
|
||||
{
|
||||
VectorAverage( ent->model->mins, ent->model->maxs, ch->origin );
|
||||
VectorAdd( ent->origin, ch->origin, ch->origin );
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorCopy( ent->origin, ch->origin );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user