aboutsummaryrefslogtreecommitdiff
path: root/effects.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-10 13:49:09 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-10 13:49:09 +0000
commitdb6933143f3b9bb423faeaf823485672ec803000 (patch)
treed47300e9713cc656af4b6f3f15b55dfcd01513e9 /effects.h
parent4dcadbd2d78207777e62e05c64e7dd5dae19f955 (diff)
downloadbullet-lab-remix-db6933143f3b9bb423faeaf823485672ec803000.tar.xz
One new level, several fixes. See changelog for details.
Diffstat (limited to 'effects.h')
-rw-r--r--effects.h7
1 files changed, 4 insertions, 3 deletions
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;