diff options
Diffstat (limited to 'src/fpsgame')
| -rw-r--r-- | src/fpsgame/fps.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fpsgame/fps.cpp b/src/fpsgame/fps.cpp index 377afa3..038fe47 100644 --- a/src/fpsgame/fps.cpp +++ b/src/fpsgame/fps.cpp @@ -876,6 +876,8 @@ namespace game void drawhudicons(fpsent *d) { + int speedforreal = (int) (sqrtf(d->vel.squaredlen()) + /*speedmodifier*/ + 1.0f); + pushhudmatrix(); hudmatrix.scale(2, 2, 1); flushhudmatrix(); @@ -887,6 +889,8 @@ namespace game { 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(); @@ -981,7 +985,7 @@ namespace game 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)); |
