diff options
author | 2014-03-10 13:49:09 +0000 | |
---|---|---|
committer | 2014-03-10 13:49:09 +0000 | |
commit | db6933143f3b9bb423faeaf823485672ec803000 (patch) | |
tree | d47300e9713cc656af4b6f3f15b55dfcd01513e9 /effects.h | |
parent | 4dcadbd2d78207777e62e05c64e7dd5dae19f955 (diff) | |
download | bullet-lab-remix-db6933143f3b9bb423faeaf823485672ec803000.tar.xz |
One new level, several fixes. See changelog for details.
Diffstat (limited to 'effects.h')
-rw-r--r-- | effects.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |