Set width and height of entities in spawn functions.
This commit is contained in:
parent
e2172a1789
commit
a913dc613b
|
@ -42,6 +42,8 @@ Entity *spawnJumpgate(void)
|
||||||
portal = getTexture("gfx/entities/portal.png");
|
portal = getTexture("gfx/entities/portal.png");
|
||||||
portalAngle = 0;
|
portalAngle = 0;
|
||||||
|
|
||||||
|
SDL_QueryTexture(jumpgate->texture, NULL, NULL, &jumpgate->w, &jumpgate->h);
|
||||||
|
|
||||||
return jumpgate;
|
return jumpgate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ Entity *spawnWaypoint(void)
|
||||||
waypoint->action = think;
|
waypoint->action = think;
|
||||||
waypoint->flags |= EF_NO_MT_BOX;
|
waypoint->flags |= EF_NO_MT_BOX;
|
||||||
|
|
||||||
|
SDL_QueryTexture(waypoint->texture, NULL, NULL, &waypoint->w, &waypoint->h);
|
||||||
|
|
||||||
return waypoint;
|
return waypoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue