From 04b3eb11fd32daaf094df676d2037ed613c172a0 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Wed, 22 Jun 2011 16:24:23 +0100 Subject: Fixes for high life stickman diff --git a/src/elements/stkm.c b/src/elements/stkm.c index 01990f6..55fc225 100644 --- a/src/elements/stkm.c +++ b/src/elements/stkm.c @@ -211,7 +211,8 @@ int update_STKM(UPDATE_FUNC_ARGS) { if ((r&0xFF) == PT_NEUT) { - parts[i].life -= (102-parts[i].life)/2; + if (parts[i].life<=100) parts[i].life -= (102-parts[i].life)/2; + else parts[i].life *= 0.9f; kill_part(r>>8); } if (bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_FAN) diff --git a/src/elements/stkm2.c b/src/elements/stkm2.c index a2731a6..02ed09f 100644 --- a/src/elements/stkm2.c +++ b/src/elements/stkm2.c @@ -211,7 +211,8 @@ int update_STKM2(UPDATE_FUNC_ARGS) { if ((r&0xFF) == PT_NEUT) { - parts[i].life -= (102-parts[i].life)/2; + if (parts[i].life<=100) parts[i].life -= (102-parts[i].life)/2; + else parts[i].life *= 0.9f; kill_part(r>>8); } if (bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_FAN) diff --git a/src/graphics.c b/src/graphics.c index 036a743..fd6213f 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1698,7 +1698,7 @@ void draw_parts(pixel *vid) { if (t==PT_STKM) //Just draw head here { - char buff[10]; //Buffer for HP + char buff[20]; //Buffer for HP pixel pc; if (mousex>(nx-3) && mousex<(nx+3) && mousey<(ny+3) && mousey>(ny-3)) //If mous is in the head @@ -1726,7 +1726,7 @@ void draw_parts(pixel *vid) } else if (t==PT_STKM2) //Just draw head here { - char buff[10]; //Buffer for HP + char buff[20]; //Buffer for HP pixel pc; if (mousex>(nx-3) && mousex<(nx+3) && mousey<(ny+3) && mousey>(ny-3)) //If mous is in the head -- cgit v0.9.2-21-gd62e