]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Remove the g_ prefix from some server code files and rename sv_main to main
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index 3707c9e484717d184b67c433c4ba117e610ec9ab..0a9a38fafe3c6b68666345b36b46a000c08a5246 100644 (file)
 #include "teamplay.qh"
 #include "spawnpoints.qh"
 #include "resources.qh"
-#include "g_damage.qh"
+#include "damage.qh"
 #include "handicap.qh"
-#include "g_hook.qh"
+#include "hook.qh"
 #include "command/common.qh"
 #include "command/vote.qh"
 #include "clientkill.qh"
 #include "cheats.qh"
-#include "g_world.qh"
+#include "world.qh"
 #include <server/gamelog.qh>
 #include "race.qh"
-#include <server/sv_main.qh>
+#include <server/main.qh>
 #include "antilag.qh"
 #include "campaign.qh"
 #include "command/common.qh"
@@ -121,9 +121,13 @@ void WriteSpectators(entity player, entity to)
 {
        if(!player) { return; } // not sure how, but best to be safe
 
+       int spec_count = 0;
        FOREACH_CLIENT(IS_REAL_CLIENT(it) && IS_SPEC(it) && it != to && it.enemy == player,
        {
+               if(spec_count >= MAX_SPECTATORS)
+                       break;
                WriteByte(MSG_ENTITY, num_for_edict(it));
+               ++spec_count;
        });
 }