From 7e9e2b7b584f9938ee1d3957365d72e543c18389 Mon Sep 17 00:00:00 2001 From: Freeman-AM Date: Sat, 11 Oct 2014 17:55:42 +0200 Subject: [PATCH] Stats: more use of sizeof --- plugins/dod/stats.sma | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/dod/stats.sma b/plugins/dod/stats.sma index bfa29608..2e3cebb3 100755 --- a/plugins/dod/stats.sma +++ b/plugins/dod/stats.sma @@ -337,7 +337,7 @@ getHits(id,killer) { new stats[9], body[8], pos = 0 g_Buffer[0] = 0 get_user_astats(id,killer,stats,body) - for(new a = 1; a < 8; ++a) + for(new a = 1; a < sizeof(body); ++a) if(body[a]) pos += format(g_Buffer[pos],charsmax(g_Buffer)-pos,"%L: %d^n",id,g_bodyParts[a],body[a]) } @@ -348,7 +348,7 @@ getMyHits(id,killed) { get_user_name(killed,name,charsmax(name)) new pos = format(g_Buffer,charsmax(g_Buffer),"%L",id,"YOU_HIT",name) get_user_vstats(id,killed,stats,body) - for(new a = 1; a < 8; ++a){ + for(new a = 1; a < sizeof(body); ++a){ if(body[a]){ found = 1 pos += format(g_Buffer[pos],charsmax(g_Buffer)-pos," %L: %d ",id,g_bodyParts[a],body[a])