#include "mapvoting.qh"
#include <server/defs.qh>
+#include <server/gamelog.qh>
#include <server/miscfunctions.qh>
#include "g_world.qh"
#include "command/cmd.qh"
}
}
firstPlaceVotes = RandomSelection_best_priority;
- if ( autocvar_sv_vote_gametype_default_current && currentVotes == firstPlaceVotes )
+ if ( autocvar_sv_vote_gametype_default_current && firstPlaceVotes == 0 )
firstPlace = currentPlace;
else
firstPlace = RandomSelection_chosen_float;
int totalvotes = 0;
FOREACH_CLIENT(IS_REAL_CLIENT(it), {
// hide scoreboard again
- if(GetResourceAmount(it, RESOURCE_HEALTH) != 2342)
+ if(GetResource(it, RES_HEALTH) != 2342)
{
- SetResourceAmount(it, RESOURCE_HEALTH, 2342);
+ SetResourceExplicit(it, RES_HEALTH, 2342);
CS(it).impulse = 0;
msg_entity = it;
if(!gametypevote || gametypevote_finished)
return false;
+ localcmd("sv_vote_gametype_hook_all\n");
+ localcmd("sv_vote_gametype_hook_", mapvote_maps[pos], "\n");
+
if ( !GameTypeVote_SetGametype(GameTypeVote_Type_FromString(mapvote_maps[pos])) )
{
LOG_TRACE("Selected gametype is not supported by any map");
}
- localcmd("sv_vote_gametype_hook_all\n");
- localcmd("sv_vote_gametype_hook_", mapvote_maps[pos], "\n");
-
gametypevote_finished = true;
return true;