Skip to content

Commit a47fd23

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 7c5e2ea + e1abbd5 commit a47fd23

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Splatter/RunState.cpp

+8-10
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,17 @@ void RunState::HandleEvents(Engine *game, SDL_Event event){
5656
case SDLK_SPACE:
5757
Bullet bullet;
5858

59-
60-
61-
bullet.Init(game, p.x + 30 * cos(p.rot), p.y + 30 * sin(p.rot), p.rot, map);
59+
bullet.Init(game, p.x + (p.hit_rad + 10) * cos(p.rot), p.y + (p.hit_rad + 10) * sin(p.rot), p.rot, map);
6260
bullets.push_back(bullet);
6361
break;
64-
}
65-
break;
66-
case SDL_MOUSEBUTTONDOWN:
67-
Bullet bullet;
68-
69-
bullet.Init(game, p.x + (p.rad + 20) * cos(p.rot), p.y + (p.rad + 20) * sin(p.rot), p.rot, map);
70-
bullets.push_back(bullet);
62+
}
7163
break;
64+
case SDL_MOUSEBUTTONDOWN:
65+
Bullet bullet;
66+
67+
bullet.Init(game, p.x + (p.hit_rad + 10) * cos(p.rot), p.y + (p.hit_rad + 10) * sin(p.rot), p.rot, map);
68+
bullets.push_back(bullet);
69+
break;
7270
}
7371

7472
p.HandleEvents(game, event);

0 commit comments

Comments
 (0)