FINALLY fix that stupid bug. The cause was two-fold: I was giving every 'enemy' a sprite, but that automatically included the player in the list of enemies, which meant that I was rendering the player's sprite while moving. Then in the sprite casting loop I was rendering things at 0.

This commit is contained in:
Zed A. Shaw 2025-02-07 11:05:15 -05:00
parent 25ad9b51f8
commit a19bc47904
4 changed files with 12 additions and 6 deletions

View file

@ -12,7 +12,7 @@ struct CameraLOL {
double targetPlaneX = 0.0;
double targetPlaneY = 0.0;
void plan_move(Raycaster &rayview, int dir, bool strafe);
Point plan_move(Raycaster &rayview, int dir, bool strafe);
void plan_rotate(Raycaster &rayview, int dir);
bool play_rotate(Raycaster &rayview);