Created
September 25, 2010 20:14
-
-
Save zc00gii/597262 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
else if(t==PT_FUSE) | |
{ | |
if(parts[i].life<=0) { | |
t = PT_NONE; | |
kill_part(i); | |
create_part(-1, x, y, PT_SMKE); | |
goto killed; | |
} | |
for(nx=-2; nx<3; nx++) | |
for(ny=-2; ny<3; ny++) | |
if(x+nx>=0 && y+ny>0 && | |
x+nx<XRES && y+ny<YRES && (nx || ny)) | |
{ | |
r = pmap[y+ny][x+nx]; | |
if((r>>8)>=NPART || !r) | |
continue; | |
if(((r&0xFF)==PT_FIRE || (r&0xFF)==PT_SPRK || (r&0xFF)==PT_PLSM) && 1>(rand()%500)) | |
{ | |
if(parts[i].life>40) { | |
parts[i].life = 39; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment