From 1df85d0937385438957cc6ed0c31ce718a085f90 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 15 Feb 2018 21:40:21 +0000 Subject: [PATCH] Misc. tweaks. --- src/entities/cannons/cannon.h | 1 - src/world/entities.c | 5 +++++ src/world/entities.h | 4 ++-- src/world/hud.c | 2 +- src/world/worldSaver.c | 2 -- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/entities/cannons/cannon.h b/src/entities/cannons/cannon.h index 7287e1b..0e59712 100644 --- a/src/entities/cannons/cannon.h +++ b/src/entities/cannons/cannon.h @@ -31,7 +31,6 @@ extern void dropCarriedItem(void); extern void addScorchDecal(int x, int y); extern Unit *createUnit(void); extern double randF(void); -extern void playSound(int snd, int ch); extern Dev dev; extern Entity *self; diff --git a/src/world/entities.c b/src/world/entities.c index eecc5b2..4026e04 100644 --- a/src/world/entities.c +++ b/src/world/entities.c @@ -97,6 +97,7 @@ void doEntities(void) if (dev.cheatStatic && self != (Entity*)world.bob) { self->isVisible = 1; + world.bob->flags |= (EF_WEIGHTLESS | EF_NO_CLIP); continue; } @@ -1043,6 +1044,8 @@ static void addRider(void) return; } } + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Couldn't add rider: out of array space."); } static void addTouched(Entity *e) @@ -1057,6 +1060,8 @@ static void addTouched(Entity *e) return; } } + + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Couldn't add touched: out of array space."); } void swapSelf(Entity *e) diff --git a/src/world/entities.h b/src/world/entities.h index 3e484ab..83c17bb 100644 --- a/src/world/entities.h +++ b/src/world/entities.h @@ -20,8 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../common.h" -#define MAX_RIDERS 12 -#define MAX_TOUCHED 12 +#define MAX_RIDERS 64 +#define MAX_TOUCHED 64 extern Texture *getTexture(const char *filename); extern void blitRect(SDL_Texture *texture, int x, int y, SDL_Rect *srcRect, int center); diff --git a/src/world/hud.c b/src/world/hud.c index e0927b9..a37df74 100644 --- a/src/world/hud.c +++ b/src/world/hud.c @@ -295,7 +295,7 @@ void setGameplayMessage(int newMessageType, const char *format, ...) vsprintf(newMessage, format, args); va_end(args); - if (newMessageType >= messageType && newMessage != NULL) + if (newMessageType >= messageType && strcmp(message, newMessage)) { STRNCPY(message, newMessage, MAX_DESCRIPTION_LENGTH); messageType = newMessageType; diff --git a/src/world/worldSaver.c b/src/world/worldSaver.c index d42185d..d9c9afb 100644 --- a/src/world/worldSaver.c +++ b/src/world/worldSaver.c @@ -157,11 +157,9 @@ static int canPersistEntity(void) case ET_DECORATION: case ET_CONSUMABLE: return 0; - break; default: return self->health > 0 && self->alive == ALIVE_ALIVE; - break; } return 0;