no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1088 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -519,10 +519,10 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
if(cl >= 0 && r >= 0)
|
||||
{
|
||||
playerent *pl = (cl == getclientnum() ? player1 : newclient(cl));
|
||||
if(pl && pl->name[0])
|
||||
if(pl)
|
||||
{
|
||||
pl->clientrole = r;
|
||||
conoutf("%s claimed %s status", pl == player1 ? "you" : pl->name, r == CR_ADMIN ? "admin" : "master");
|
||||
if(pl->name[0]) conoutf("%s claimed %s status", pl == player1 ? "you" : pl->name, r == CR_ADMIN ? "admin" : "master");
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -531,12 +531,12 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
case SV_SERVOPCMD:
|
||||
{
|
||||
int cmd = getint(p), arg = getint(p);
|
||||
playerent *pl = (arg == getclientnum() ? NULL : getclient(arg));
|
||||
switch(cmd)
|
||||
{
|
||||
case SOPCMD_KICK:
|
||||
case SOPCMD_BAN:
|
||||
{
|
||||
playerent *pl = (arg == getclientnum() ? NULL : getclient(arg));
|
||||
if(pl) conoutf("%s has been %s", pl->name, cmd == SOPCMD_KICK ? "kicked" : "banned");
|
||||
break;
|
||||
}
|
||||
@@ -552,6 +552,14 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
autoteambalance = arg == 1;
|
||||
if(!joining) conoutf("autoteam is %s", autoteambalance ? "enabled" : "disabled");
|
||||
break;
|
||||
|
||||
case SOPCMD_GIVEMASTER:
|
||||
if(pl) conoutf("the admin gave master state to %s", pl->name);
|
||||
break;
|
||||
|
||||
case SOPCMD_FORCETEAM:
|
||||
if(pl) conoutf("player %s was forced to change the team", pl->name);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ enum { SOPCMD_KICK = 0, SOPCMD_BAN, SOPCMD_REMBANS, SOPCMD_MASTERMODE, SOPCMD_AU
|
||||
#define DAF 1.0f
|
||||
#define DVF 100.0f
|
||||
|
||||
enum { DISC_NONE = 0, DISC_EOP, DISC_CN, DISC_MKICK, DISC_MBAN, DISC_TAGT, DISC_BANREFUSE, DISC_WRONGPW, DISC_MLOGINFAIL, DISC_MAXCLIENTS, DISC_MASTERMODE, DISC_AUTOKICK, DISC_NUM };
|
||||
enum { DISC_NONE = 0, DISC_EOP, DISC_CN, DISC_MKICK, DISC_MBAN, DISC_TAGT, DISC_BANREFUSE, DISC_WRONGPW, DISC_SOPLOGINFAIL, DISC_MAXCLIENTS, DISC_MASTERMODE, DISC_AUTOKICK, DISC_NUM };
|
||||
|
||||
/* Gamemodes
|
||||
0 tdm
|
||||
|
||||
@@ -205,8 +205,11 @@ void drawradar(int w, int h)
|
||||
entity *e = f.flag;
|
||||
if(!e) continue;
|
||||
float yaw = showmap ? 0 : player1->yaw;
|
||||
if(f.state==CTFF_STOLEN && f.actor && insideradar(centerpos, res/2, f.actor->o))
|
||||
drawradarent(f.actor->o.x*coordtrans+iconsize/2, f.actor->o.y*coordtrans+iconsize/2, yaw, 3, f.team, iconsize, true); // draw near flag thief
|
||||
if(f.state==CTFF_STOLEN)
|
||||
{
|
||||
if(f.actor && i != team_int(player1->team) && insideradar(centerpos, res/2, f.actor->o))
|
||||
drawradarent(f.actor->o.x*coordtrans+iconsize/2, f.actor->o.y*coordtrans+iconsize/2, yaw, 3, f.team, iconsize, true); // draw near flag thief
|
||||
}
|
||||
else if(insideradar(centerpos, res/2, vec(e->x, e->y, centerpos.z))) drawradarent(e->x*coordtrans, e->y*coordtrans, yaw, 3, f.team, iconsize, false); // draw on entitiy pos
|
||||
}
|
||||
}
|
||||
@@ -232,7 +235,7 @@ void drawteamicons(int w, int h)
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glColor3f(1, 1, 1);
|
||||
static Texture *icons = NULL;
|
||||
if(!icons) icons = textureload("packages/misc/teamicons.png", 3);
|
||||
if(!icons) icons = textureload("packages/misc/teamicons.png");
|
||||
quad(icons->id, VIRTW-VIRTH/12-10, 10, VIRTH/12, team_int(player1->team) ? 0.5f : 0, 0, 0.5f, 0.5f);
|
||||
glEnable(GL_CULL_FACE);
|
||||
}
|
||||
|
||||
@@ -662,11 +662,12 @@ void changeclientrole(int client, int role, char *pwd = NULL, bool force=false)
|
||||
int serverop = serveroperator();
|
||||
if(force || role == CR_DEFAULT || (role == CR_MASTER && serverop < 0) || (role == CR_ADMIN && pwd && pwd[0] && adminpasswd && !strcmp(adminpasswd, pwd)))
|
||||
{
|
||||
if(role == clients[client]->role) return;
|
||||
if(role > CR_DEFAULT) loopv(clients) clients[i]->role = CR_DEFAULT;
|
||||
clients[client]->role = role;
|
||||
sendserveropinfo(-1);
|
||||
}
|
||||
else if(pwd && pwd[0]) disconnect_client(client, DISC_MLOGINFAIL); // avoid brute-force
|
||||
else if(pwd && pwd[0]) disconnect_client(client, DISC_SOPLOGINFAIL); // avoid brute-force
|
||||
}
|
||||
|
||||
void serveropcmddenied(int receiver, int requiredrole)
|
||||
|
||||
Reference in New Issue
Block a user