From a913dc613b2fcd389a8587e827b0cb762073da87 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 1 Apr 2016 14:20:47 +0100 Subject: [PATCH] Set width and height of entities in spawn functions. --- src/battle/jumpgate.c | 2 ++ src/battle/waypoints.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/battle/jumpgate.c b/src/battle/jumpgate.c index 64c6365..8fd5ede 100644 --- a/src/battle/jumpgate.c +++ b/src/battle/jumpgate.c @@ -41,6 +41,8 @@ Entity *spawnJumpgate(void) portal = getTexture("gfx/entities/portal.png"); portalAngle = 0; + + SDL_QueryTexture(jumpgate->texture, NULL, NULL, &jumpgate->w, &jumpgate->h); return jumpgate; } diff --git a/src/battle/waypoints.c b/src/battle/waypoints.c index 70226d4..7f95402 100644 --- a/src/battle/waypoints.c +++ b/src/battle/waypoints.c @@ -45,6 +45,8 @@ Entity *spawnWaypoint(void) waypoint->action = think; waypoint->flags |= EF_NO_MT_BOX; + SDL_QueryTexture(waypoint->texture, NULL, NULL, &waypoint->w, &waypoint->h); + return waypoint; }