Skip to content

Commit

Permalink
Fixed operator precedence warning in KOBO_myship::shot_single()
Browse files Browse the repository at this point in the history
  • Loading branch information
olofson committed Jan 17, 2017
1 parent 1c97641 commit 2c78c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/myship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,8 @@ void KOBO_myship::shot_single(float dir, int loffset, int hoffset, int speed)
bolts[i].x = x - vx + loffset * sdi + hoffset * cdi;
bolts[i].y = y - vy - loffset * cdi + hoffset * sdi;
int sp = game.bolt_speed * speed;
bolts[i].dx = vx + sp * sdi >> 16;
bolts[i].dy = vy - sp * cdi >> 16;
bolts[i].dx = vx + (sp * sdi >> 16);
bolts[i].dy = vy - (sp * cdi >> 16);
if(!bolts[i].object)
bolts[i].object = gengine->get_obj(LAYER_PLAYER);
if(bolts[i].object)
Expand Down

0 comments on commit 2c78c09

Please sign in to comment.