diff options
author | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-03-12 02:59:55 +0000 |
---|---|---|
committer | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-03-12 02:59:55 +0000 |
commit | 30531dfb996a1c4b7c1975c7f234bec359b36668 (patch) | |
tree | d5fd391a7f035c100a9cff278a7cb8fe40311e38 /towernbullet.h | |
parent | f4832349efdf06d8a1a410c636045f505efb52f1 (diff) | |
download | bullet-lab-remix-30531dfb996a1c4b7c1975c7f234bec359b36668.tar.xz |
Modify ClearRange for level "hyper-threading".
Diffstat (limited to 'towernbullet.h')
-rw-r--r-- | towernbullet.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/towernbullet.h b/towernbullet.h index 8d0969c..51f6d93 100644 --- a/towernbullet.h +++ b/towernbullet.h @@ -269,7 +269,7 @@ int CreateBullet9(double x,double y,double bs,int explo,int cnt,int brk,bool eff if (eff)BulletEffect_Attatch(i); return i; } -void CreateBullet255(double x,double y,double bs) +void CreateBullet255(double x,double y,double bs,int spno=0) { int i; if (bulcnt==0) @@ -284,8 +284,10 @@ void CreateBullet255(double x,double y,double bs) bullet[i].bullettype=255; bullet[i].bulletpos.x=x; bullet[i].bulletpos.y=y; - bullet[i].bulletdir.x=x-playerpos.x; - bullet[i].bulletdir.y=y-playerpos.y; + bullet[i].redattrib=spno; + vector2d spos=playerpos+splitData[spno]; + bullet[i].bulletdir.x=x-spos.x; + bullet[i].bulletdir.y=y-spos.y; bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y; bullet[i].dist=sqrt(bullet[i].dist); bullet[i].bulletspeed=bs; @@ -917,8 +919,9 @@ void ProcessBullet255(int i) if (!DisablePlayer) { bullet[i].bulletspeed=10; - bullet[i].bulletdir.x=bullet[i].bulletpos.x-playerpos.x; - bullet[i].bulletdir.y=bullet[i].bulletpos.y-playerpos.y; + vector2d spos=playerpos+splitData[bullet[i].redattrib]; + bullet[i].bulletdir.x=bullet[i].bulletpos.x-spos.x; + bullet[i].bulletdir.y=bullet[i].bulletpos.y-spos.y; bullet[i].dist=bullet[i].bulletdir.x*bullet[i].bulletdir.x+bullet[i].bulletdir.y*bullet[i].bulletdir.y; bullet[i].dist=sqrt(bullet[i].dist); if (LOWFPS) @@ -932,7 +935,7 @@ void ProcessBullet255(int i) bullet[i].bulletpos.y-=bullet[i].bulletspeed*(bullet[i].bulletdir.y/bullet[i].dist)/20; } } - double dis=GetDist(bullet[i].bulletpos,playerpos); + double dis=GetDist(bullet[i].bulletpos,playerpos+splitData[bullet[i].redattrib]); if (dis<=6||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600) { score+=mult*100;mult+=0.0002f; |