void drawhudicons(fpsent *d)
{
+ int speedforreal = (int) (sqrtf(d->vel.squaredlen()) + /*speedmodifier*/ + 1.0f);
+
pushhudmatrix();
hudmatrix.scale(2, 2, 1);
flushhudmatrix();
{
if(d->armour) draw_textf("%d", (HICON_X + HICON_STEP + HICON_SIZE + HICON_SPACE)/2, HICON_TEXTY/2, d->armour);
draw_textf("%d", (HICON_X + 2*HICON_STEP + HICON_SIZE + HICON_SPACE)/2, HICON_TEXTY/2, d->ammo[d->gunselect]);
+ //~draw_textf("%d", (HICON_X + 2*HICON_STEP + HICON_SIZE + HICON_SPACE)/2+800, HICON_TEXTY/2, (int) (100.0f+speedmodifier));
+ draw_textf("%d", (HICON_X + 2*HICON_STEP + HICON_SIZE + HICON_SPACE)/2+400, HICON_TEXTY/2, speedforreal);
}
pophudmatrix();
flushhudmatrix();
defformatstring(label, "%d", p->ammo[gun]);
- int tw, th, moved, movew = 0, moveh = 0; text_bounds(label, tw, th);
+ int tw, th; text_bounds(label, tw, th);
vec2 textdrawpos = vec2(-tw, -th).div(2);
float ammoratio = (float)p->ammo[gun] / itemstats[gun-GUN_SG].add;
bvec color = bvec::hexcolor(p->ammo[gun] == 0 || ammoratio >= 1.0f ? 0xFFFFFF : (ammoratio >= 0.5f ? 0xFFC040 : 0xFF0000));