#include "mapvoting.qh"
-#include "_all.qh"
#include "g_world.qh"
#include "command/cmd.qh"
}
string MapVote_Suggest(string m)
-{
+{SELFPARAM();
float i;
if(m == "")
return "That's not how to use this command.";
}
void MapVote_SendPicture(float id)
-{
+{SELFPARAM();
msg_entity = self;
- WriteByte(MSG_ONE, SVC_TEMPENTITY);
- WriteByte(MSG_ONE, TE_CSQC_PICTURE);
+ WriteHeader(MSG_ONE, TE_CSQC_PICTURE);
WriteByte(MSG_ONE, id);
WritePicture(MSG_ONE, strcat(mapvote_screenshot_dirs[mapvote_maps_screenshot_dir[id]], "/", mapvote_maps[id]), 3072);
}
}
}
-float MapVote_SendEntity(entity to, int sf)
+bool MapVote_SendEntity(entity this, entity to, int sf)
{
float i;
if(sf & 1)
sf &= ~2; // if we send 1, we don't need to also send 2
- WriteByte(MSG_ENTITY, ENT_CLIENT_MAPVOTE);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_MAPVOTE);
WriteByte(MSG_ENTITY, sf);
if(sf & 1)
if ( !GameTypeVote_SetGametype(GameTypeVote_Type_FromString(mapvote_maps[pos])) )
{
- dprint("Selected gametype is not supported by any map");
+ LOG_TRACE("Selected gametype is not supported by any map");
}
localcmd("sv_vote_gametype_hook_all\n");