mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
PEGASUS: Add some more protection about junk flying off-screen
This commit is contained in:
parent
71756bdf4e
commit
b2c29410b9
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user