From db6933143f3b9bb423faeaf823485672ec803000 Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Mon, 10 Mar 2014 13:49:09 +0000 Subject: One new level, several fixes. See changelog for details. --- effects.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'effects.h') diff --git a/effects.h b/effects.h index ab63cbf..1b3c246 100644 --- a/effects.h +++ b/effects.h @@ -3,9 +3,10 @@ //Copyright Chrisoft 2014 //static const char* EFFECTS_H_FN="effects.h"; -void SCEffect_Attatch() +void SCEffect_Attatch(vector2d Target=vector2d(-100,-100)) { int cnt=rand()%8+3; + if(Target.x<-50&&Target.y<-50)Target=playerpos; for (int ii=1;ii<=cnt;++ii) { int i; @@ -19,8 +20,8 @@ void SCEffect_Attatch() } bullet[i].exist=true; bullet[i].bullettype=254; - bullet[i].bulletpos.x=playerpos.x+3; - bullet[i].bulletpos.y=playerpos.y+3; + bullet[i].bulletpos.x=Target.x+3; + bullet[i].bulletpos.y=Target.y+3; bullet[i].bulletdir.x=rand()%100-50; bullet[i].bulletdir.y=rand()%100-50; bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y; -- cgit v1.2.3