From 5652ecc5c20a6cce0745b20587ff4dfec8103ff3 Mon Sep 17 00:00:00 2001 From: savask Date: Sat, 15 Oct 2011 23:20:54 +0700 Subject: [PATCH] Some work on lightning for stick mans and fighters. --- src/elements/figh.c | 12 +++--------- src/main.c | 4 ++-- src/powder.c | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/elements/figh.c b/src/elements/figh.c index abed67408..74dcf14dc 100644 --- a/src/elements/figh.c +++ b/src/elements/figh.c @@ -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 (tarx0) || sr==SPC_AIR || sr == PT_NEUT || sr == PT_PHOT) + if ((sr0) || 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 ((sr0) || sr==SPC_AIR || sr == PT_NEUT || sr == PT_PHOT) + if ((sr0) || sr==SPC_AIR || sr == PT_NEUT || sr == PT_PHOT || sr == PT_LIGH) player2[2] = sr; else player2[2] = PT_DUST; diff --git a/src/powder.c b/src/powder.c index 41f9196b4..5e828ecf1 100644 --- a/src/powder.c +++ b/src/powder.c @@ -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;