#include <common/net_linked.qh>
#include "../common/mapinfo.qh"
#include "../common/playerstats.qh"
#include <common/net_linked.qh>
#include "../common/mapinfo.qh"
#include "../common/playerstats.qh"
-float mapvote_suggestion_ptr;
-float mapvote_voters;
-float mapvote_selections[MAPVOTE_COUNT];
-float mapvote_maps_flags[MAPVOTE_COUNT];
-float mapvote_run;
-float mapvote_detail;
-float mapvote_abstain;
-.float mapvote;
+int mapvote_suggestion_ptr;
+int mapvote_voters;
+int mapvote_selections[MAPVOTE_COUNT];
+int mapvote_maps_flags[MAPVOTE_COUNT];
+bool mapvote_run;
+bool mapvote_detail;
+bool mapvote_abstain;
+.int mapvote;
n = tokenizebyseparator(autocvar_sv_vote_gametype_options, " ");
n = min(MAPVOTE_COUNT, n);
gametype_mask = 0;
n = tokenizebyseparator(autocvar_sv_vote_gametype_options, " ");
n = min(MAPVOTE_COUNT, n);
gametype_mask = 0;
- if ( mapvote_maps[j] )
- {
- strunzone(mapvote_maps[j]);
- mapvote_maps[j] = string_null;
- }
- if ( mapvote_maps_pakfile[j] )
- {
- strunzone(mapvote_maps_pakfile[j]);
- mapvote_maps_pakfile[j] = string_null;
- }
+ strfree(mapvote_maps[j]);
+ strfree(mapvote_maps_pakfile[j]);
pakfile = whichpack(strcat(mapfile, ".tga"));
if(pakfile == "")
pakfile = whichpack(strcat(mapfile, ".jpg"));
pakfile = whichpack(strcat(mapfile, ".tga"));
if(pakfile == "")
pakfile = whichpack(strcat(mapfile, ".jpg"));
- float mask,power;
- mask = 0;
- for(i = 0, power = 1; i < mapvote_count; ++i, power *= 2)
- if(mapvote_maps_flags[i] & GTV_AVAILABLE )
- mask |= power;
+ int mask = 0;
+ for(int j = 0; j < mapvote_count; ++j)
+ {
+ if(mapvote_maps_flags[j] & GTV_AVAILABLE)
+ mask |= BIT(j);
+ }
- for ( i = 0; i < mapvote_count; ++i )
- WriteByte(MSG_ENTITY, mapvote_maps_flags[i]);
+ for (int j = 0; j < mapvote_count; ++j)
+ WriteByte(MSG_ENTITY, mapvote_maps_flags[j]);
- float i;
- float firstPlace, secondPlace, currentPlace;
- float firstPlaceVotes, secondPlaceVotes, currentVotes;
- float mapvote_voters_real;
+ int i;
+ int firstPlace, secondPlace, currentPlace;
+ int firstPlaceVotes, secondPlaceVotes, currentVotes;
+ int mapvote_voters_real;
MapVote_TouchMask();
mapvote_keeptwotime = 0;
result = strcat(":vote:keeptwo:", mapvote_maps[firstPlace]);
result = strcat(result, ":", ftos(firstPlaceVotes));
result = strcat(result, ":", mapvote_maps[secondPlace]);
result = strcat(result, ":", ftos(secondPlaceVotes), "::");
MapVote_TouchMask();
mapvote_keeptwotime = 0;
result = strcat(":vote:keeptwo:", mapvote_maps[firstPlace]);
result = strcat(result, ":", ftos(firstPlaceVotes));
result = strcat(result, ":", mapvote_maps[secondPlace]);
result = strcat(result, ":", ftos(secondPlaceVotes), "::");
- if(it.impulse >= 1 && it.impulse <= mapvote_count)
- if( mapvote_maps_flags[it.impulse - 1] & GTV_AVAILABLE )
+ if(CS(it).impulse >= 1 && CS(it).impulse <= mapvote_count)
+ if( mapvote_maps_flags[CS(it).impulse - 1] & GTV_AVAILABLE )