mirror of
https://github.com/yquake2/xatrix.git
synced 2025-04-19 08:41:23 +00:00
Ensure that amb4 sound entities loop correctly.
The sound file is 2720 milliseconds long, the code replays every 2.7 seconds. That was always very optimistic and I'm pretty sure that it never worked really correct. With YQ2 timings have become much more precise, we're calling the code more or less exactly after 2700 ms. The remaining 20 ms aren't enough for the network frame, parsing it at client side, maybe reuploading the sample and processing it in both the sound front- and backend. This leads to slight stuttering. Since the sample loops perfectly at every point take the save approach and lower the replay delay to 2 seconds. Closes yquake2/yquake2#506.
This commit is contained in:
parent
9713815e04
commit
9f2aa4b5f0
1 changed files with 1 additions and 1 deletions
|
@ -2897,7 +2897,7 @@ amb4_think(edict_t *ent)
|
|||
return;
|
||||
}
|
||||
|
||||
ent->nextthink = level.time + 2.7;
|
||||
ent->nextthink = level.time + 2.0;
|
||||
gi.sound(ent, CHAN_VOICE, amb4sound, 1, ATTN_NONE, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue