diff --git a/source/src/entities.cpp b/source/src/entities.cpp index e15e4b49..11217183 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -326,7 +326,7 @@ void flagdropped(int flag, int action, short x, short y, short z) p.o.y = y; p.o.z = z; p.vel.z = -0.8f; - loopi(50) moveplayer(&p, 50, true); // calc drop position + loopi(10) moveplayer(&p, 10, true, 50); // calc drop position f.flag->x = (short)p.o.x; f.flag->y = (short)p.o.y; f.flag->z = (short)p.o.z; diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 39305f11..c64d65b0 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -32,6 +32,7 @@ bool alerr(bool msg = true) return er > 0; } +// provides an interface for callbacks. struct sourceowner { @@ -503,7 +504,6 @@ struct oggstream } } - if(!active) reset(); return active; } @@ -974,7 +974,7 @@ VARFP(soundvol, 0, 128, 255, void setmusicvol() { extern int musicvol; - if(gamemusic) gamemusic->setvolume(musicvol/255.0f); + if(gamemusic) gamemusic->setvolume(musicvol > 0 ? musicvol/255.0f : 0); } VARFP(musicvol, 0, 64, 255, setmusicvol()); @@ -1074,6 +1074,7 @@ void music(char *name, char *millis, char *cmd) { conoutf("could not play music: %s", name); } + setmusicvol(); } else conoutf("could not open music: %s", name); }