summaryrefslogtreecommitdiff
path: root/engine/bulletpattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engine/bulletpattern.cpp')
-rw-r--r--engine/bulletpattern.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/bulletpattern.cpp b/engine/bulletpattern.cpp
index 6ed4322..39f6742 100644
--- a/engine/bulletpattern.cpp
+++ b/engine/bulletpattern.cpp
@@ -99,8 +99,8 @@ BulletPattern4::BulletPattern4(const Vector2& initpos) {
for(int j = 0; j < 24; j++) {
for(float i = 0; i < 2 * M_PI; i += 0.4, k++) {
bullets[k].pos = initpos;
- bullets[k].dir.x = cosf(i) / 40;
- bullets[k].dir.y = sinf(i) / 40;
+ bullets[k].dir.x = cosf(i) * 0.002;
+ bullets[k].dir.y = sinf(i) * 0.002;
bullets[k].data.a = j * 10;
bullets[k].data.b = i;
}
@@ -112,9 +112,10 @@ void BulletPattern4::update() {
while(num_bullets < 384 && (unsigned int)(bullets[num_bullets].data.a) < steps) {
num_bullets++;
}
+
+ Matrix2 m = rotation_matrix(cos(steps * 0.010) * 0.005);
+
for(int i = 0; i < num_bullets; i++) {
- float l = log1pf((steps - bullets[i].data.a));
- Matrix2 m = rotation_matrix(l);
bullets[i].dir = m * bullets[i].dir;
bullets[i].pos += bullets[i].dir;
}