fixed panning problem

This commit is contained in:
Magnus Auvinen 2007-12-11 22:03:17 +00:00
parent 63e834c353
commit e9560899a3
2 changed files with 12 additions and 3 deletions

View file

@ -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 */

View file

@ -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
{