Fix FIGH loading and bad variable names
This commit is contained in:
parent
e2c9882692
commit
5ab1ab8b46
15
src/main.c
15
src/main.c
@ -985,11 +985,26 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
|
|||||||
{
|
{
|
||||||
STKM_init_legs(&player, i-1);
|
STKM_init_legs(&player, i-1);
|
||||||
player.spwn = 1;
|
player.spwn = 1;
|
||||||
|
player.elem = PT_DUST;
|
||||||
}
|
}
|
||||||
else if (parts[i-1].type == PT_STKM2)
|
else if (parts[i-1].type == PT_STKM2)
|
||||||
{
|
{
|
||||||
STKM_init_legs(&player2, i-1);
|
STKM_init_legs(&player2, i-1);
|
||||||
player2.spwn = 1;
|
player2.spwn = 1;
|
||||||
|
player2.elem = PT_DUST;
|
||||||
|
}
|
||||||
|
else if (parts[i-1].type == PT_FIGH)
|
||||||
|
{
|
||||||
|
unsigned char fcount = 0;
|
||||||
|
while (fcount < 100 && fcount < (fighcount+1) && fighters[fcount].spwn==1) fcount++;
|
||||||
|
if (fcount < 100 && fighters[fcount].spwn==0)
|
||||||
|
{
|
||||||
|
parts[i-1].tmp = fcount;
|
||||||
|
fighters[fcount].spwn = 1;
|
||||||
|
fighters[fcount].elem = PT_DUST;
|
||||||
|
fighcount++;
|
||||||
|
STKM_init_legs(&(fighters[fcount]), i-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ver<48 && (ty==OLD_PT_WIND || (ty==PT_BRAY&&parts[i-1].life==0)))
|
if (ver<48 && (ty==OLD_PT_WIND || (ty==PT_BRAY&&parts[i-1].life==0)))
|
||||||
|
14
src/powder.c
14
src/powder.c
@ -1029,9 +1029,9 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
|
|||||||
}
|
}
|
||||||
if (t==PT_FIGH)
|
if (t==PT_FIGH)
|
||||||
{
|
{
|
||||||
unsigned char cunt = 0;
|
unsigned char fcount = 0;
|
||||||
while (cunt < 100 && cunt < (fighcount+1) && fighters[cunt].spwn==1) cunt++;
|
while (fcount < 100 && fcount < (fighcount+1) && fighters[fcount].spwn==1) fcount++;
|
||||||
if (cunt < 100 && fighters[cunt].spwn==0)
|
if (fcount < 100 && fighters[fcount].spwn==0)
|
||||||
{
|
{
|
||||||
parts[i].x = (float)x;
|
parts[i].x = (float)x;
|
||||||
parts[i].y = (float)y;
|
parts[i].y = (float)y;
|
||||||
@ -1040,11 +1040,11 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
|
|||||||
parts[i].vy = 0;
|
parts[i].vy = 0;
|
||||||
parts[i].life = 100;
|
parts[i].life = 100;
|
||||||
parts[i].ctype = 0;
|
parts[i].ctype = 0;
|
||||||
parts[i].tmp = cunt;
|
parts[i].tmp = fcount;
|
||||||
parts[i].temp = ptypes[t].heat;
|
parts[i].temp = ptypes[t].heat;
|
||||||
STKM_init_legs(&fighters[cunt], i);
|
STKM_init_legs(&fighters[fcount], i);
|
||||||
fighters[cunt].spwn = 1;
|
fighters[fcount].spwn = 1;
|
||||||
fighters[cunt].elem = PT_DUST;
|
fighters[fcount].elem = PT_DUST;
|
||||||
fighcount++;
|
fighcount++;
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
|
Loading…
Reference in New Issue
Block a user