stricter ALfloat usage

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4773 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2010-01-15 00:02:34 +00:00
parent d42fd4eda2
commit 3269c01608
+4 -6
View File
@@ -144,9 +144,7 @@ bool source::pitch(float p)
bool source::position(const vec &pos)
{
alclearerr();
alSourcefv(id, AL_POSITION, (ALfloat *) &pos);
return !ALERR;
return position(pos.x, pos.y, pos.z);
}
bool source::position(float x, float y, float z)
@@ -166,10 +164,10 @@ bool source::velocity(float x, float y, float z)
vec source::position()
{
alclearerr();
vec p;
alGetSourcefv(id, AL_POSITION, (ALfloat*) &p);
ALfloat v[3];
alGetSourcefv(id, AL_POSITION, v);
if(ALERR) return vec(0,0,0);
else return p;
else return vec(v[0], v[1], v[2]);
}
bool source::sourcerelative(bool enable)