summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorsavask <savask@yandex.ru>2011-08-29 16:47:22 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-26 14:31:55 (GMT)
commit00d604820d4900a422efd43dd3dd0a6f225e4adf (patch)
treec0c578eeffcfac21c440e9e00b09ce5ad1a88404 /src/main.c
parentf8d54e66dba5d8448d30f61f84883b4e7e6e1087 (diff)
downloadpowder-00d604820d4900a422efd43dd3dd0a6f225e4adf.zip
powder-00d604820d4900a422efd43dd3dd0a6f225e4adf.tar.gz
Added fighters.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 4b6d413..935be55 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1113,6 +1113,8 @@ void clear_sim(void)
memset(wireless, 0, sizeof(wireless));
memset(gol2, 0, sizeof(gol2));
memset(portalp, 0, sizeof(portalp));
+ memset(fighters, 0, sizeof(fighters));
+ fighcount = 0;
ISSPAWN1 = ISSPAWN2 = 0;
player[27] = 0;
player2[27] = 0;
@@ -3115,7 +3117,7 @@ int main(int argc, char *argv[])
c = (b&1) ? sl : sr; //c is element to be spawned
su = c;
- if (c!=WL_SIGN+100)
+ if (c!=WL_SIGN+100 && c!=PT_FIGH)
{
if (!bq)
for (signi=0; signi<MAXSIGNS; signi++)
@@ -3144,6 +3146,12 @@ int main(int argc, char *argv[])
if (!bq)
add_sign_ui(vid_buf, x, y);
}
+
+ if (c==PT_FIGH)
+ {
+ if (!bq)
+ create_part(-1, x, y, PT_FIGH);
+ }
//for the click functions, lx and ly, are the positions of where the FIRST click happened. x,y are current mouse position.
else if (lb)//lb means you are holding mouse down
{