X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fdomination.qc;h=b58c0f074fd052ba8824c007d89293247d5ea686;hb=97f5b5383d79263056aefc82ea1a78ade2671a93;hp=0f80cdac0b259aaa47c5a23905d9b16aeff25fc8;hpb=8bac780bb3585a2668469ea787ca92474bb89ed5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/domination.qc b/qcsrc/server/domination.qc index 0f80cdac0..b58c0f074 100644 --- a/qcsrc/server/domination.qc +++ b/qcsrc/server/domination.qc @@ -32,20 +32,16 @@ float pps_red; float pps_blue; float pps_yellow; float pps_pink; -void set_dom_state(void) +void set_dom_state(entity e) { // BIG ugly hack to make stat sending work - self.dom_total_pps = total_pps; - self.dom_pps_red = pps_red; - self.dom_pps_blue = pps_blue; + e.dom_total_pps = total_pps; + e.dom_pps_red = pps_red; + e.dom_pps_blue = pps_blue; if(c3 >= 0) - { - self.dom_pps_yellow = pps_yellow; - } + e.dom_pps_yellow = pps_yellow; if(c4 >= 0) - { - self.dom_pps_pink = pps_pink; - } + e.dom_pps_pink = pps_pink; } void() dom_controlpoint_setup; @@ -178,13 +174,13 @@ void dompoint_captured () WaypointSprite_UpdateSprites(self.sprite, "dom-pink", "", ""); } - FOR_EACH_PLAYER(self) - set_dom_state(); - WaypointSprite_UpdateTeamRadar(self.sprite, RADARICON_DOMPOINT, colormapPaletteColor(self.goalentity.team - 1, 0)); WaypointSprite_Ping(self.sprite); self.captime = time; + + FOR_EACH_REALCLIENT(head) + set_dom_state(head); }; void AnimateDomPoint() @@ -685,22 +681,15 @@ void dom_delayedinit() // if no control points are found, spawn defaults if (find(world, classname, "dom_controlpoint") == world) { - // here follow default domination points for each map - /* - if (world.model == "maps/e1m1.bsp") - { - dom_spawnpoint('0 0 0'); - } - else - */ + // TODO in a few months (maybe 2011/08): change this into error() and remove this very poor dom point selection + backtrace("This map contains no dom_controlpoint entities. A very poor dom point placement will be chosen. Please fix the map."); + + // if no supported map was found, make every deathmatch spawn a point + head = find(world, classname, "info_player_deathmatch"); + while (head) { - // if no supported map was found, make every deathmatch spawn a point - head = find(world, classname, "info_player_deathmatch"); - while (head) - { - dom_spawnpoint(head.origin); - head = find(head, classname, "info_player_deathmatch"); - } + dom_spawnpoint(head.origin); + head = find(head, classname, "info_player_deathmatch"); } }