[Fix] Small graphics bug.
This commit is contained in:
parent
d46f509ee5
commit
fd3f3a78b6
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user