From 5623a6484eb70d126c06339619cc0c452879558b Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Thu, 19 Mar 2009 20:21:19 +0000 Subject: [PATCH] bugfix: players were incorreclty starting with the speed powerup --- Makefile | 12 ++---------- shared.c | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 0fa53c4..f560530 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,2 @@ -all: rc edit - -rc: rc.c shared.c rc.h shared.h globals.h defs.h - gcc -O3 -Wall -DREV=`./getsvnrev.sh` -o rc -g rc.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/sw/lib -L/usr/local/lib -L/opt/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lSDL_mixer - -edit: edit.c shared.c edit.h shared.h globals.h defs.h - gcc -D__EDITOR -DREV=`./getsvnrev.sh` -Wall -o edit -g edit.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/sw/lib -lSDLmain -lSDL -lSDL_image -lSDL_ttf -L/opt/local/lib -lSDL_gfx - -app: rc - ./makeapp.sh +rc: rc.c rc.h + gcc -Wall -DREV=`./getsvnrev.sh` -orc -g rc.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lSDL_mixer diff --git a/shared.c b/shared.c index f4349a1..f44303a 100644 --- a/shared.c +++ b/shared.c @@ -676,20 +676,22 @@ printf(".\n"); void setdefaults(sprite_t *s) { if (isplayer(s)) { // set permenant powerups based on level - if (curlevelnum > 20) { - s->permspeed = B_TRUE; - } else { - s->permspeed = B_FALSE; - } - if (curlevelnum > 40) { - s->permmask = B_TRUE; - } else { - s->permmask = B_FALSE; - } - if (curlevelnum > 60) { - s->permumbrella = B_TRUE; - } else { - s->permumbrella = B_FALSE; + if (curlevelnum != INTRO_LEVELNUM) { + if (curlevelnum > 20) { + s->permspeed = B_TRUE; + } else { + s->permspeed = B_FALSE; + } + if (curlevelnum > 40) { + s->permmask = B_TRUE; + } else { + s->permmask = B_FALSE; + } + if (curlevelnum > 60) { + s->permumbrella = B_TRUE; + } else { + s->permumbrella = B_FALSE; + } } // player powerup stats