X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmapvoting.qc;h=5c564d56db45fc7baeabeb9c6fd22240cc4263df;hb=d46f774178c3d0025b5942a2f170519182897297;hp=53cf1cdbacbc97699fa79556bba95aee49ef7497;hpb=3018b03b7ad0decee85f2a659783d0b5309fe5a3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 53cf1cdba..5c564d56d 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -1,5 +1,7 @@ #include "mapvoting.qh" +#include +#include #include "g_world.qh" #include "command/cmd.qh" #include "command/getreplies.qh" @@ -107,16 +109,8 @@ void MapVote_UnzoneStrings() { for(int j = 0; j < mapvote_count; ++j) { - 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]); } } @@ -597,9 +591,9 @@ void MapVote_Tick() int totalvotes = 0; FOREACH_CLIENT(IS_REAL_CLIENT(it), { // hide scoreboard again - if(it.health != 2342) + if(GetResourceAmount(it, RESOURCE_HEALTH) != 2342) { - it.health = 2342; + SetResourceAmountExplicit(it, RESOURCE_HEALTH, 2342); CS(it).impulse = 0; msg_entity = it;