diff --git a/src/entities/blobs/bob.c b/src/entities/blobs/bob.c index dd1c7c8..bf565a8 100644 --- a/src/entities/blobs/bob.c +++ b/src/entities/blobs/bob.c @@ -654,6 +654,7 @@ static SDL_Rect *getCurrentSprite(void) if (world.bob->spriteFrame >= s->numFrames) { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", world.bob->name, world.bob->type, world.bob->spriteFrame, s->numFrames); world.bob->spriteFrame = 0; } diff --git a/src/entities/boss/blobBoss.c b/src/entities/boss/blobBoss.c index 19899d7..7230f1b 100644 --- a/src/entities/boss/blobBoss.c +++ b/src/entities/boss/blobBoss.c @@ -191,6 +191,7 @@ static SDL_Rect *getCurrentSprite(void) if (self->spriteFrame >= s->numFrames) { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames); self->spriteFrame = 0; } diff --git a/src/entities/boss/eyeDroidCommander.c b/src/entities/boss/eyeDroidCommander.c index 8878ede..321b806 100644 --- a/src/entities/boss/eyeDroidCommander.c +++ b/src/entities/boss/eyeDroidCommander.c @@ -414,6 +414,7 @@ static SDL_Rect *getCurrentSprite(void) if (self->spriteFrame >= s->numFrames) { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames); self->spriteFrame = 0; } diff --git a/src/entities/entity.c b/src/entities/entity.c index 1287b9c..f218b89 100644 --- a/src/entities/entity.c +++ b/src/entities/entity.c @@ -172,6 +172,7 @@ static SDL_Rect *getCurrentSprite(void) if (self->spriteFrame >= s->numFrames) { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames); self->spriteFrame = 0; } diff --git a/src/entities/unit.c b/src/entities/unit.c index ca04de0..8b866aa 100644 --- a/src/entities/unit.c +++ b/src/entities/unit.c @@ -290,6 +290,7 @@ static SDL_Rect *getCurrentSprite(void) if (self->spriteFrame >= s->numFrames) { + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames); self->spriteFrame = 0; } diff --git a/src/world/player.c b/src/world/player.c index 54f9f02..fe8126f 100644 --- a/src/world/player.c +++ b/src/world/player.c @@ -90,10 +90,8 @@ static void compareQuadtree(void) for (e = world.entityHead.next ; e != NULL ; e = e->next) {numEnts++;} - printf("numEnts=%d, numCandidates=%d\n", numEnts, numCandidates); - if (numCandidates > numEnts) { - exit(1); + printf("WARNING: numEnts=%d, numCandidates=%d\n", numEnts, numCandidates); } }