From 455d119b66d1c61cb536923a47a561a0c620d8fa Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Wed, 17 Oct 2007 03:23:48 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1379 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/sound.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/sound.cpp b/source/src/sound.cpp index d3b862b0..28b7d6f0 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -429,11 +429,11 @@ void playsound(int n, physent *p, entity *ent, const vec *loc) if(!slot.s->sound) { - s_sprintfd(buf)("packages/audio/sounds/%s", slot.s->name); - - loopi(2) + const char *exts[] = { "", ".wav", ".ogg" }; + string buf; + loopi(sizeof(exts)/sizeof(exts[0])) { - if(i) s_strcat(buf, ".wav"); + s_sprintf(buf)("packages/audio/sounds/%s%s", slot.s->name, exts[i]); const char *file = findfile(path(buf), "rb"); #ifdef USE_MIXER slot.s->sound = Mix_LoadWAV(file);