Skip to content

Commit

Permalink
PEGASUS: Add some more protection about junk flying off-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Mar 20, 2012
1 parent 71756bd commit b2c2941
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/pegasus/neighborhood/mars/spacejunk.cpp
Expand Up @@ -80,7 +80,7 @@ void SpaceJunk::setCenter(const CoordType centerX, const CoordType centerY) {

Common::Rect r;
getBounds(r);
r.moveTo(CLIP<int>(centerX - (r.width() >> 1), 0, 640), CLIP<int>(centerY - (r.height() >> 1), 0, 480));
r.moveTo(CLIP<int>(centerX - (r.width() >> 1), 0, 640 - r.width()), CLIP<int>(centerY - (r.height() >> 1), 0, 480 - r.height()));
setBounds(r);
}

Expand Down

0 comments on commit b2c2941

Please sign in to comment.