[Fix] Small graphics bug.

This commit is contained in:
Allanis 2013-02-08 16:10:31 +00:00
parent d46f509ee5
commit fd3f3a78b6

View File

@ -126,6 +126,9 @@ void pilot_render(Pilot* p) {
// Get the sprite corresponding to the direction facing.
sprite = (int)(p->solid->dir / (2.0*M_PI / (t->sy * t->sx)));
// Ugly hack to make sure it's always "inbound".
if(sprite > (int)(t->sy*t->sx)-1) sprite = (int)(t->sy*t->sx)-1;
gl_blitSprite(t, &p->solid->pos, sprite % (int)t->sx, sprite / (int)t->sy);
}