mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed panning problem
This commit is contained in:
parent
63e834c353
commit
e9560899a3
|
@ -185,6 +185,11 @@ static void mix(short *final_out, unsigned frames)
|
|||
lvol = (lvol*(range-dist))/range;
|
||||
rvol = (rvol*(range-dist))/range;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvol = 0;
|
||||
rvol = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* process all frames */
|
||||
|
|
|
@ -2106,9 +2106,6 @@ void render_game()
|
|||
if(local_info && local_info->team == -1)
|
||||
spectate = true;
|
||||
|
||||
// set listner pos
|
||||
snd_set_listener_pos(local_character_pos.x, local_character_pos.y);
|
||||
|
||||
animstate idlestate;
|
||||
anim_eval(&data->animations[ANIM_BASE], 0, &idlestate);
|
||||
anim_eval_add(&idlestate, &data->animations[ANIM_IDLE], 0, 1.0f);
|
||||
|
@ -2231,10 +2228,17 @@ void render_game()
|
|||
}
|
||||
}
|
||||
|
||||
// set listner pos
|
||||
if(spectate)
|
||||
{
|
||||
local_target_pos = mouse_pos;
|
||||
snd_set_listener_pos(mouse_pos.x, mouse_pos.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
local_target_pos = local_character_pos + mouse_pos;
|
||||
snd_set_listener_pos(local_character_pos.x, local_character_pos.y);
|
||||
}
|
||||
|
||||
// snap input
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue