mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2024-12-28 04:23:42 +01:00
Smoother NPC movement
This commit is contained in:
parent
490fceca25
commit
aa448c4dc6
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue