Some work on lightning for stick mans and fighters.

This commit is contained in:
savask 2011-10-15 23:20:54 +07:00 committed by Simon Robertshaw
parent a075fd5a9a
commit 5652ecc5c2
3 changed files with 6 additions and 12 deletions

View File

@ -45,17 +45,9 @@ int update_FIGH(UPDATE_FUNC_ARGS)
case 1:
if ((pow(tarx-x, 2) + pow(tary-y, 2))<600)
{
if (figh[2] == PT_FIRE)
if (figh[2] == PT_FIRE || figh[2] == PT_LIGH)
figh[0] = (int)figh[0] | 0x08;
}
if ((pow(tarx-x, 2) + pow(tary-y, 2))<300)
{
if (figh[2] == PT_FIRE)
figh[0] = 0x08;
else
figh[0] = 0;
}
else
if (tarx<x)
{
@ -75,6 +67,8 @@ int update_FIGH(UPDATE_FUNC_ARGS)
break;
}
figh[1] = figh[0];
run_stickman(figh, UPDATE_FUNC_SUBCALL_ARGS);
return 0;
}

View File

@ -3625,14 +3625,14 @@ int main(int argc, char *argv[])
//Setting an element for the stick man
if (player[27]==0)
{
if ((sr<PT_NUM && ptypes[sr].falldown>0) || sr==SPC_AIR || sr == PT_NEUT || sr == PT_PHOT)
if ((sr<PT_NUM && ptypes[sr].falldown>0) || sr==SPC_AIR || sr == PT_NEUT || sr == PT_PHOT || sr == PT_LIGH)
player[2] = sr;
else
player[2] = PT_DUST;
}
if (player2[27]==0)
{
if ((sr<PT_NUM && ptypes[sr].falldown>0) || sr==SPC_AIR || sr == PT_NEUT || sr == PT_PHOT)
if ((sr<PT_NUM && ptypes[sr].falldown>0) || sr==SPC_AIR || sr == PT_NEUT || sr == PT_PHOT || sr == PT_LIGH)
player2[2] = sr;
else
player2[2] = PT_DUST;

View File

@ -16,7 +16,7 @@ int lighting_recreate = 0;
float player[29];
float player2[29];
float fighters[256][28]; //255 is the maximum number of fighters
float fighters[256][29]; //255 is the maximum number of fighters
unsigned char fighcount = 0; //Contains the number of fighters
particle *parts;