detach sounds from disconnecting player
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2092 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -980,6 +980,16 @@ void playsoundname(char *s, const vec *loc, int vol)
|
||||
void sound(int n) { playsound(n); }
|
||||
COMMAND(sound, ARG_1INT);
|
||||
|
||||
void detachsounds(playerent *owner)
|
||||
{
|
||||
loopv(locations)
|
||||
{
|
||||
location &l = locations[i];
|
||||
if(l.p != owner) continue;
|
||||
l.attachtoworldobj(new vec(l.p->o));
|
||||
}
|
||||
}
|
||||
|
||||
void playsoundc(int n)
|
||||
{
|
||||
addmsg(SV_SOUND, "i", n);
|
||||
|
||||
Reference in New Issue
Block a user