initialize all stickmen variables, not just legs

This commit is contained in:
jacob1 2012-10-15 21:30:47 -04:00 committed by Simon Robertshaw
parent fd07d35e34
commit 6d1c7be740
2 changed files with 8 additions and 2 deletions

View File

@ -103,9 +103,9 @@ int Simulation::Load(int fullX, int fullY, GameSave * save)
fighcount++; fighcount++;
//currentPart.tmp = fcount; //currentPart.tmp = fcount;
parts[i].tmp = fcount; parts[i].tmp = fcount;
Element_STKM::STKM_init_legs(this, &(fighters[fcount]), i);
fighters[fcount].spwn = 1; fighters[fcount].spwn = 1;
fighters[fcount].elem = PT_DUST; fighters[fcount].elem = PT_DUST;
Element_STKM::STKM_init_legs(this, &(fighters[fcount]), i);
break; break;
} }
} }

View File

@ -79,7 +79,7 @@ int Element_STKM::run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) {
playerp->elem = parts[i].ctype; playerp->elem = parts[i].ctype;
playerp->frames++; playerp->frames++;
//Tempirature handling //Temperature handling
if (parts[i].temp<243) if (parts[i].temp<243)
parts[i].life -= 1; parts[i].life -= 1;
if ((parts[i].temp<309.6f) && (parts[i].temp>=243)) if ((parts[i].temp<309.6f) && (parts[i].temp>=243))
@ -545,6 +545,12 @@ void Element_STKM::STKM_init_legs(Simulation * sim, playerst* playerp, int i)
playerp->legs[13] = y+12; playerp->legs[13] = y+12;
playerp->legs[14] = x+3; playerp->legs[14] = x+3;
playerp->legs[15] = y+12; playerp->legs[15] = y+12;
for (int i = 0; i < 8; i++)
playerp->accs[i] = 0;
playerp->comm = 0;
playerp->pcomm = 0;
playerp->frames = 0;
} }