isOnScreen -> isVisible.
This commit is contained in:
parent
e70966e35d
commit
156a5dac8f
|
@ -28,4 +28,3 @@ extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
|
|||
extern int getDistance(int x1, int y1, int x2, int y2);
|
||||
extern void swapSelf(Entity *e);
|
||||
|
||||
extern Entity *self;
|
||||
|
|
|
@ -130,7 +130,7 @@ struct Entity {
|
|||
int isSolid;
|
||||
int isStatic;
|
||||
int isOnGround;
|
||||
int isOnScreen;
|
||||
int isVisible;
|
||||
int isMissionTarget;
|
||||
int observationTime;
|
||||
Entity *riding;
|
||||
|
|
|
@ -25,4 +25,3 @@ extern Sprite *getSprite(char *name);
|
|||
extern void initFleshChunk(Decoration *d);
|
||||
extern void initDebris(Decoration *d);
|
||||
|
||||
extern World world;
|
||||
|
|
|
@ -91,7 +91,7 @@ void doEntities(void)
|
|||
|
||||
removeFromQuadtree(self, &world.quadtree);
|
||||
|
||||
self->isOnScreen = 0;
|
||||
self->isVisible = 0;
|
||||
|
||||
if (self->flags & EF_TELEPORTING)
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ void doEntities(void)
|
|||
|
||||
if ((self->flags & EF_ALWAYS_PROCESS) > 0 || getDistance(camMidX, camMidY, self->x, self->y) < SCREEN_WIDTH || isObserving())
|
||||
{
|
||||
self->isOnScreen = 1;
|
||||
self->isVisible = 1;
|
||||
}
|
||||
else if (self->flags & EF_KILL_OFFSCREEN)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ void doEntities(void)
|
|||
|
||||
self->riding = NULL;
|
||||
|
||||
if (self->isOnScreen)
|
||||
if (self->isVisible)
|
||||
{
|
||||
memset(touched, 0, sizeof(Entity*) * MAX_TOUCHED);
|
||||
|
||||
|
@ -124,7 +124,7 @@ void doEntities(void)
|
|||
|
||||
if (self->flags & EF_GONE)
|
||||
{
|
||||
self->isOnScreen = 0;
|
||||
self->isVisible = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ void doEntities(void)
|
|||
|
||||
if ((self->flags & EF_FLICKER) && flicker)
|
||||
{
|
||||
self->isOnScreen = 0;
|
||||
self->isVisible = 0;
|
||||
}
|
||||
|
||||
if (self->alive == ALIVE_DEAD)
|
||||
|
@ -231,7 +231,7 @@ void drawEntities(int plane)
|
|||
|
||||
for (i = 0, self = candidates[i] ; self != NULL ; self = candidates[++i])
|
||||
{
|
||||
draw = self->isOnScreen && !(self->flags & EF_GONE) && self->plane == plane;
|
||||
draw = self->isVisible && !(self->flags & EF_GONE) && self->plane == plane;
|
||||
|
||||
if (draw)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "../common.h"
|
||||
|
||||
extern Entity *initItem(void);
|
||||
extern int rrnd(int low, int high);
|
||||
extern int getRandomPlayerWeapon(int excludeGrenades);
|
||||
extern Sprite *getSprite(char *name);
|
||||
|
|
|
@ -500,7 +500,7 @@ void observeActivation(Entity *e)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (e->observationTime < SDL_GetTicks() && !e->isOnScreen)
|
||||
if (e->observationTime < SDL_GetTicks() && !e->isVisible)
|
||||
{
|
||||
for (i = 0 ; i < MAX_ENTS_TO_OBSERVE ; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue