]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Merge branch 'master' into terencehill/itemstime
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 82871d8b224d87879b5f14730e4013bcb4c84893..4babf32b22eb8c9e8cb8db51b5c7b066b488becf 100644 (file)
@@ -2510,71 +2510,6 @@ void SoundEntity_Detach(entity pl)
         SoundEntity_StopSound(pl, i);
 }
 
-
-float ParseCommandPlayerSlotTarget_firsttoken;
-entity GetCommandPlayerSlotTargetFromTokenizedCommand(float tokens, float idx) // idx = start index
-{
-       string s;
-       entity e, head;
-       float n;
-
-       s = string_null;
-
-       ParseCommandPlayerSlotTarget_firsttoken = -1;
-
-       if (tokens > idx)
-       {
-               if (substring(argv(idx), 0, 1) == "#")
-               {
-                       s = substring(argv(idx), 1, -1);
-                       ++idx;
-                       if (s == "") if (tokens > idx)
-                       {
-                               s = argv(idx);
-                               ++idx;
-                       }
-                       ParseCommandPlayerSlotTarget_firsttoken = idx;
-                       n = stof(s);
-                       if (s == ftos(n) && n > 0 && n <= maxclients)
-                       {
-                               e = edict_num(n);
-                               if (e.flags & FL_CLIENT)
-                                       return e;
-                       }
-               }
-               else
-               {
-                       // it must be a nick name
-                       s = argv(idx);
-                       ++idx;
-                       ParseCommandPlayerSlotTarget_firsttoken = idx;
-
-                       n = 0;
-                       FOR_EACH_CLIENT(head)
-                               if (head.netname == s)
-                               {
-                                       e = head;
-                                       ++n;
-                               }
-                       if (n == 1)
-                               return e;
-
-                       s = strdecolorize(s);
-                       n = 0;
-                       FOR_EACH_CLIENT(head)
-                               if (strdecolorize(head.netname) == s)
-                               {
-                                       e = head;
-                                       ++n;
-                               }
-                       if (n == 1)
-                               return e;
-               }
-       }
-
-       return world;
-}
-
 .float scale2;
 
 float modeleffect_SendEntity(entity to, float sf)