playsound sanity checks

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2888 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-10 21:45:04 +00:00
parent c52cc754d7
commit 66d9ae2e0b
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
}
case SV_SOUND:
playsound(getint(p), !d ? NULL : d);
playsound(getint(p), d);
break;
case SV_VOICECOMTEAM:
+5 -4
View File
@@ -516,7 +516,8 @@ struct entityreference : worldobjreference
const vec &currentposition() const
{
static vec tmp = vec(ent->x, ent->y, ent->z);
static vec tmp;
tmp = vec(ent->x, ent->y, ent->z);
return tmp;
}
@@ -1718,9 +1719,9 @@ location *playsound(int n, const worldobjreference &r, int priority, float offse
}
void playsound(int n, int priority) { playsound(n, camerareference(), priority); }
void playsound(int n, physent *p, int priority) { playsound(n, physentreference(p), priority); }
void playsound(int n, entity *e, int priority) { playsound(n, entityreference(e), priority); }
void playsound(int n, const vec *v, int priority) { playsound(n, staticreference(*v), priority); }
void playsound(int n, physent *p, int priority) { if(p) playsound(n, physentreference(p), priority); }
void playsound(int n, entity *e, int priority) { if(e) playsound(n, entityreference(e), priority); }
void playsound(int n, const vec *v, int priority) { if(v) playsound(n, staticreference(*v), priority); }
void playsoundname(char *s, const vec *loc, int vol)
{