X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmapvoting.qc;h=9242a5b6f4d057aa99e95f356cf80098eb2f6a12;hb=ecfd9fafd3d908056d16d122c7dc4c5ea9f44074;hp=e427483069522786f163c6ff9cf6908151c8e84f;hpb=36c060287c80e935205582a163ceeac7559fe47f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index e42748306..9242a5b6f 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -1,18 +1,19 @@ #include "mapvoting.qh" -#include -#include -#include -#include "g_world.qh" -#include "command/cmd.qh" -#include "command/getreplies.qh" -#include "../common/constants.qh" +#include +#include #include -#include "../common/mapinfo.qh" -#include "../common/playerstats.qh" +#include #include -#include "../common/util.qh" - +#include +#include +#include +#include +#include +#include +#include +#include +#include // definitions @@ -405,7 +406,7 @@ bool MapVote_SendEntity(entity this, entity to, int sf) void MapVote_Spawn() { - Net_LinkEntity(mapvote_ent = spawn(), false, 0, MapVote_SendEntity); + Net_LinkEntity(mapvote_ent = new(mapvote_ent), false, 0, MapVote_SendEntity); } void MapVote_TouchMask() @@ -590,11 +591,18 @@ void MapVote_Tick() return; int totalvotes = 0; - FOREACH_CLIENT(IS_REAL_CLIENT(it), { + FOREACH_CLIENT(true, { + if(!IS_REAL_CLIENT(it)) + { + // apply the same special health value to bots too for consistency's sake + if(GetResource(it, RES_HEALTH) != 2342) + SetResourceExplicit(it, RES_HEALTH, 2342); + continue; + } // hide scoreboard again if(GetResource(it, RES_HEALTH) != 2342) { - SetResourceExplicit(it, RES_HEALTH, 2342); + SetResourceExplicit(it, RES_HEALTH, 2342); // health in the voting phase CS(it).impulse = 0; msg_entity = it;