diff --git a/src/npc.c b/src/npc.c index 9c88246..8223156 100644 --- a/src/npc.c +++ b/src/npc.c @@ -267,10 +267,8 @@ void npc_draw(Game *game) { } #endif // DEBUGMODE - int16_t delX = - ((int16_t)((Data->curx >> PRECISION) * PXSIZE)) - (int16_t)pl->wx; - int16_t delY = - ((int16_t)((Data->cury >> PRECISION) * PXSIZE)) - (int16_t)pl->wy; + int16_t delX = ((Data->curx * PXSIZE)>>PRECISION) - (int16_t)pl->wx; + int16_t delY = ((Data->cury * PXSIZE)>>PRECISION) - (int16_t)pl->wy; bopti_image_t *face = npc_sprites[Data->face]; dimage(pl->px - P_WIDTH / 2 + delX, pl->py - P_HEIGHT / 2 + delY, face); }