This commit is contained in:
parent
55e36f25d3
commit
7a43d05c5f
9 changed files with 15 additions and 23 deletions
|
@ -461,7 +461,7 @@ DVECTOR const &MapSize=Lvl.getMapSize16();
|
|||
DVECTOR const &ThingPos=thing->getPos();
|
||||
|
||||
// Will speed this up - doubt it, not now!!
|
||||
if (i!=CThing::TYPE_PLAYER && (ThingPos.vx<0 || ThingPos.vx>=MapSize.vx || ThingPos.vy<0 || ThingPos.vy>=MapSize.vy))
|
||||
if (!thing->allowOffMap() && (ThingPos.vx<0 || ThingPos.vx>=MapSize.vx || ThingPos.vy<0 || ThingPos.vy>=MapSize.vy))
|
||||
{
|
||||
thing->setToShutdown();
|
||||
SYSTEM_DBGMSG("ThingOffMap: T:%i S:%i TXY%i %i, MWH%i %i\n",(int)thing->getThingType(),(int)thing->getThingSubType(),ThingPos.vx,ThingPos.vy,MapSize.vx,MapSize.vy);
|
||||
|
|
|
@ -198,7 +198,8 @@ virtual void leftThinkZone(int _frames) {}
|
|||
CRECT const &getCollisionArea() {return m_collisionArea;}
|
||||
DVECTOR const &getCollisionSize() {return m_collisionSize;}
|
||||
|
||||
virtual int canCollide() {return true;}
|
||||
virtual int canCollide() {return (true);}
|
||||
virtual bool allowOffMap() {return (false);}
|
||||
virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
|
||||
int checkCollisionAgainstArea(CRECT *_rect);
|
||||
void updateCollisionArea();
|
||||
|
@ -254,6 +255,7 @@ public:
|
|||
};
|
||||
virtual TYPE getThingType() {return TYPE_PLAYER;}
|
||||
virtual bool alwaysThink() {return(true);}
|
||||
bool allowOffMap() {return(true);}
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue