fix item position for 4x3 screens, fix message in coop, fix default to sendmap to server...

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5605 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-08-12 02:06:46 +00:00
parent 04eaffb33a
commit 785e4f2ae0
4 changed files with 12 additions and 16 deletions
+1 -1
View File
@@ -600,7 +600,7 @@ bool tryrespawn()
}
else if(spawnpermission > SP_OK_NUM)
{
hudeditf(HUDMSG_TIMER, "\f%s", spawnpermission == SP_WRONGMAP ? "3You have to be on the correct map to spawn. Type /getmap" : "4Awaiting permission to spawn. Don\'t panic!");
hudeditf(HUDMSG_TIMER, "\f%s", (spawnpermission == SP_WRONGMAP || m_coop) ? "3You have to be on the correct map to spawn. Type /getmap" : "4Awaiting permission to spawn. Don\'t panic!");
}
else if(player1->state==CS_DEAD)
{
+4 -6
View File
@@ -268,8 +268,6 @@ void drawdmgindicator()
glEnable(GL_TEXTURE_2D);
}
VARP(xpos1, 0, 1700, 3000); // REMOVE
void drawequipicons(playerent *p)
{
glDisable(GL_BLEND);
@@ -277,9 +275,9 @@ void drawequipicons(playerent *p)
glColor4f(1.0f, 1.0f, 1.0f, 0.2f+(sinf(lastmillis/100.0f)+1.0f)/2.0f);
// health & armor
if(p->armour) drawequipicon(620, 1650, (p->armour-1)/25, 2, false);
if(p->armour) drawequipicon(560, 1650, (p->armour-1)/25, 2, false);
drawequipicon(20, 1650, 2, 3, (p->state!=CS_DEAD && p->health<=20 && !m_osok));
if(p->mag[GUN_GRENADE]) drawequipicon(xpos1, 1650, 3, 1, false);
if(p->mag[GUN_GRENADE]) drawequipicon(1520, 1650, 3, 1, false);
// weapons
int c = p->weaponsel->type != GUN_GRENADE ? p->weaponsel->type : p->prevweaponsel->type, r = 0;
@@ -287,7 +285,7 @@ void drawequipicons(playerent *p)
if(c>3) { c -= 4; r = 1; }
if(p->weaponsel && p->weaponsel->type>=GUN_KNIFE && p->weaponsel->type<NUMGUNS)
drawequipicon(1220, 1650, c, r, (!p->weaponsel->mag && p->weaponsel->type != GUN_KNIFE && p->weaponsel->type != GUN_GRENADE));
drawequipicon(1020, 1650, c, r, (!p->weaponsel->mag && p->weaponsel->type != GUN_KNIFE && p->weaponsel->type != GUN_GRENADE));
glEnable(GL_BLEND);
}
@@ -921,7 +919,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
{
pushfont("huddigits");
draw_textf("%d", 90, 823, p->health);
if(p->armour) draw_textf("%d", 390, 823, p->armour);
if(p->armour) draw_textf("%d", 360, 823, p->armour);
if(p->weaponsel && p->weaponsel->type>=GUN_KNIFE && p->weaponsel->type<NUMGUNS)
{
glMatrixMode(GL_MODELVIEW);
+4 -4
View File
@@ -2008,7 +2008,7 @@ bool scallvote(voteinfo *v, ENetPacket *msg) // true if a regular vote was calle
int time = servmillis - c->lastvotecall;
if ( c->nvotes > 0 && time > 4*60*1000 ) c->nvotes -= time/(4*60*1000);
if ( c->nvotes < 0 ) c->nvotes = 0;
if ( c->nvotes < 0 || c->role == CR_ADMIN ) c->nvotes = 0;
c->nvotes++;
if( !v || !v->isvalid() || (v->boot && !b) ) error = VOTEE_INVALID;
@@ -2955,17 +2955,17 @@ void process(ENetPacket *packet, int sender, int chan)
reject = "server incoming achieved its limits";
sendservmsg("\f3server does not support more incomings: limit achieved", sender);
}
else if(mp == MAP_NOTFOUND && !strchr(scl.mapperm, 'C') && cl->role < CR_ADMIN) // default: only admins can create maps
else if(mp == MAP_NOTFOUND && strchr(scl.mapperm, 'C') && cl->role < CR_ADMIN)
{
reject = "no permission for initial upload";
sendservmsg("\f3initial map upload rejected: you need to be admin", sender);
}
else if(mp == MAP_TEMP && revision >= mapbuffer.revision && !strchr(scl.mapperm, 'U') && cl->role < CR_ADMIN) // default: only admins can update maps
else if(mp == MAP_TEMP && revision >= mapbuffer.revision && !strchr(scl.mapperm, 'u') && cl->role < CR_ADMIN) // default: only admins can update maps
{
reject = "no permission to update";
sendservmsg("\f3map update rejected: you need to be admin", sender);
}
else if(mp == MAP_TEMP && revision < mapbuffer.revision && !strchr(scl.mapperm, 'R') && cl->role < CR_ADMIN) // default: only admins can revert maps to older revisions
else if(mp == MAP_TEMP && revision < mapbuffer.revision && !strchr(scl.mapperm, 'r') && cl->role < CR_ADMIN) // default: only admins can revert maps to older revisions
{
reject = "no permission to revert revision";
sendservmsg("\f3map revert to older revision rejected: you need to be admin to upload an older map", sender);
+3 -5
View File
@@ -619,13 +619,13 @@ void weapon::renderstats()
{
char gunstats[64];
sprintf(gunstats, oldfashionedgunstats ? "%i/%i" : "%i", mag, ammo);
draw_text(gunstats, 690, 823);
draw_text(gunstats, 590, 823);
if(!oldfashionedgunstats)
{
int offset = text_width(gunstats);
glScalef(0.5f, 0.5f, 1.0f);
sprintf(gunstats, "%i", ammo);
draw_text(gunstats, (690 + offset)*2, 826*2);
draw_text(gunstats, (590 + offset)*2, 826*2);
glLoadIdentity();
}
}
@@ -945,13 +945,11 @@ void grenades::dropnade()
thrownade(n);
}
VARP(xpos2, 0, 920, 3000); // REMOVE
void grenades::renderstats()
{
char gunstats[64];
sprintf(gunstats, "%i", mag);
draw_text(gunstats, xpos2, 827);
draw_text(gunstats, 830, 827);
}
bool grenades::selectable() { return weapon::selectable() && state != GST_INHAND && mag; }