persist musicvol
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2190 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user