]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
remove SoundEntity support - it's a waste of bandwidth
authorRudolf Polzer <divverent@xonotic.org>
Tue, 1 Jan 2013 18:51:30 +0000 (19:51 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 1 Jan 2013 18:51:49 +0000 (19:51 +0100)
If anyone REALLY needs this, do the sound in CSQC instead.

qcsrc/server/cl_client.qc
qcsrc/server/miscfunctions.qc

index 3caa12a9f1fa6ad6cf1dca7f0f3334fd1f5ae414..4f5671df082117db61307d639106d9756dbe4976 100644 (file)
@@ -1538,8 +1538,6 @@ void ClientConnect (void)
        if(!sv_foginterval && world.fog != "")
                stuffcmd(self, strcat("\nfog ", world.fog, "\nr_fog_exp2 0\nr_drawfog 1\n"));
 
-       SoundEntity_Attach(self);
-
        if(autocvar_g_hitplots || strstrofs(strcat(" ", autocvar_g_hitplots_individuals, " "), strcat(" ", self.netaddress, " "), 0) >= 0)
        {
                self.hitplotfh = fopen(strcat("hits-", matchid, "-", self.netaddress, "-", ftos(self.playerid), ".plot"), FILE_WRITE);
@@ -1635,8 +1633,6 @@ void ClientDisconnect (void)
        bprint ("^4",self.netname);
        bprint ("^4 disconnected\n");
 
-       SoundEntity_Detach(self);
-
        DropAllRunes(self);
        MUTATOR_CALLHOOK(ClientDisconnect);
 
index b57377b1052410d5f0e5fba3f95687da3eb8e584..ffbc74448e518f0cf47d38645dade5d2de906327 100644 (file)
@@ -2525,43 +2525,6 @@ vector gettaginfo_relative(entity e, float tag)
     return gettaginfo(gettaginfo_relative_ent, tag);
 }
 
-void SoundEntity_StartSound(entity pl, float chan, string samp, float vol, float attn)
-{
-    float p;
-    p = pow(2, chan);
-    if (pl.soundentity.cnt & p)
-        return;
-    soundtoat(MSG_ALL, pl.soundentity, gettaginfo(pl.soundentity, 0), chan, samp, vol, attn);
-    pl.soundentity.cnt |= p;
-}
-
-void SoundEntity_StopSound(entity pl, float chan)
-{
-    float p;
-    p = pow(2, chan);
-    if (pl.soundentity.cnt & p)
-    {
-        stopsoundto(MSG_ALL, pl.soundentity, chan);
-        pl.soundentity.cnt &~= p;
-    }
-}
-
-void SoundEntity_Attach(entity pl)
-{
-    pl.soundentity = spawn();
-    pl.soundentity.classname = "soundentity";
-    pl.soundentity.owner = pl;
-    setattachment(pl.soundentity, pl, "");
-    setmodel(pl.soundentity, "null");
-}
-
-void SoundEntity_Detach(entity pl)
-{
-    float i;
-    for (i = 0; i <= 7; ++i)
-        SoundEntity_StopSound(pl, i);
-}
-
 .float scale2;
 
 float modeleffect_SendEntity(entity to, float sf)