stop() and velocity(0) in source reset
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2700 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+15
-4
@@ -86,13 +86,17 @@ struct source
|
||||
priority = SP_NORMAL;
|
||||
|
||||
// restore default settings
|
||||
rewind();
|
||||
|
||||
stop();
|
||||
buffer(NULL);
|
||||
gain(1.0f);
|
||||
|
||||
pitch(1.0f);
|
||||
position(0.0, 0.0, 0.0);
|
||||
sourcerelative(false);
|
||||
gain(1.0f);
|
||||
position(0.0f, 0.0f, 0.0f);
|
||||
velocity(0.0f, 0.0f, 0.0f);
|
||||
|
||||
looping(false);
|
||||
sourcerelative(false);
|
||||
|
||||
// fit into distance model
|
||||
alSourcef(id, AL_REFERENCE_DISTANCE, al_referencedistance/100.0f);
|
||||
@@ -194,6 +198,13 @@ struct source
|
||||
return !alerr();
|
||||
}
|
||||
|
||||
bool velocity(float x, float y, float z)
|
||||
{
|
||||
alclearerr();
|
||||
alSource3f(id, AL_VELOCITY, x, y, z);
|
||||
return !alerr();
|
||||
}
|
||||
|
||||
vec position()
|
||||
{
|
||||
alclearerr();
|
||||
|
||||
Reference in New Issue
Block a user