refactor: move wave length calculation to util class

This commit is contained in:
jeefo 2023-08-22 09:45:29 +03:00
commit 5fddfed5ce
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
8 changed files with 87 additions and 86 deletions

View file

@ -348,7 +348,7 @@ void BotConfig::loadChatterConfig () {
for (auto &sound : sentences) {
sound.trim ().trim ("\"");
auto duration = game.getWaveLen (sound.chars ());
const auto duration = util.getWaveLength (sound.chars ());
if (duration > 0.0f) {
m_chatter[event.code].emplace (cr::move (sound), event.repeat, duration);