This commit is contained in:
parent
c574dd3894
commit
adee4b97be
64 changed files with 313 additions and 62 deletions
|
@ -153,6 +153,16 @@ void CNpcBalloonBridgePlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
PntList++;
|
||||
|
||||
m_maxExtension = abs( ( ( newYPos << 4 ) + 16 ) - startPos.vy );
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -92,7 +92,7 @@ void CNpcGeyserPlatformGenerator::think( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcGeyserPlatformGenerator::getThinkBBox()
|
||||
/*const CRECT *CNpcGeyserPlatformGenerator::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -103,4 +103,4 @@ const CRECT *CNpcGeyserPlatformGenerator::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
|
@ -23,7 +23,7 @@ class CNpcGeyserPlatformGenerator : public CNpcPlatform
|
|||
public:
|
||||
void setTargetType( NPC_PLATFORM_UNIT_TYPE targetType ) {m_targetType = targetType;}
|
||||
virtual void render();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void think( int _frames );
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
|
|
@ -95,6 +95,16 @@ void CNpcBranchPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
{
|
||||
m_reversed = false;
|
||||
}
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -31,6 +31,16 @@ void CNpcBubblePlatform::postInit()
|
|||
CNpcPlatform::postInit();
|
||||
|
||||
m_pop = false;
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -109,7 +119,7 @@ void CNpcBubblePlatform::processLifetime( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcBubblePlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcBubblePlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -120,4 +130,4 @@ const CRECT *CNpcBubblePlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
|
@ -23,7 +23,7 @@ class CNpcBubblePlatform : public CNpcPlatform
|
|||
public:
|
||||
virtual void render();
|
||||
virtual void postInit();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void processLifetime( int _frames );
|
||||
virtual void processMovement( int _frames );
|
||||
|
|
|
@ -65,6 +65,16 @@ void CNpcBubbleTubePlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
PntList++;
|
||||
|
||||
m_maxExtension = ( ( newYPos << 4 ) + 16 ) - startPos.vy;
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -89,11 +89,16 @@ void CNpcBigWheelPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
{
|
||||
init( startPos );
|
||||
}
|
||||
|
||||
m_thinkArea.x1 = Pos.vx - m_extension;
|
||||
m_thinkArea.x2 = Pos.vx + m_extension;
|
||||
m_thinkArea.y1 = Pos.vy - m_extension;
|
||||
m_thinkArea.y2 = Pos.vy + m_extension;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcBigWheelPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcBigWheelPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -104,7 +109,7 @@ const CRECT *CNpcBigWheelPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
class CNpcBigWheelPlatform : public CNpcPlatform
|
||||
{
|
||||
public:
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
virtual void postInit();
|
||||
virtual int getHeightFromPlatformAtPosition(int _x,int _y, int offsetX = 0, int offsetY = 0);
|
||||
protected:
|
||||
|
|
|
@ -87,7 +87,7 @@ void CNpcConveyorPlatformGenerator::think( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcConveyorPlatformGenerator::getThinkBBox()
|
||||
/*const CRECT *CNpcConveyorPlatformGenerator::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -98,7 +98,7 @@ const CRECT *CNpcConveyorPlatformGenerator::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -183,7 +183,7 @@ void CNpcConveyorPlatform::processMovement( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcConveyorPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcConveyorPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -194,7 +194,7 @@ const CRECT *CNpcConveyorPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class CNpcConveyorPlatform : public CNpcPlatform
|
|||
{
|
||||
public:
|
||||
virtual void postInit();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
virtual void render();
|
||||
virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
|
||||
protected:
|
||||
|
@ -37,7 +37,7 @@ class CNpcConveyorPlatformGenerator : public CNpcPlatform
|
|||
{
|
||||
public:
|
||||
virtual void render();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void think( int _frames );
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
|
|
@ -38,7 +38,7 @@ void CNpcDropPlatform::processMovement( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcDropPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcDropPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -49,4 +49,4 @@ const CRECT *CNpcDropPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
class CNpcDropPlatform : public CNpcPlatform
|
||||
{
|
||||
public:
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//public:
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void processMovement( int _frames );
|
||||
};
|
||||
|
|
|
@ -127,6 +127,16 @@ void CNpcDualPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
setLineBase( Pos );
|
||||
m_otherPlatform->setLineBase( slavePos );
|
||||
}
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -311,7 +321,7 @@ void CNpcDualPlatform::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcDualPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcDualPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -322,7 +332,7 @@ const CRECT *CNpcDualPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
void setLineBase( DVECTOR base ) {m_lineBase = base;}
|
||||
DVECTOR getLineBase() {return( m_lineBase );}
|
||||
virtual void render();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
||||
virtual void processMovement( int _frames );
|
||||
|
|
|
@ -150,7 +150,7 @@ void CNpcJellyfishPlatform::think( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcJellyfishPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcJellyfishPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -161,4 +161,4 @@ const CRECT *CNpcJellyfishPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
|
@ -23,7 +23,7 @@ class CNpcJellyfishPlatform : public CNpcLinearPlatform
|
|||
public:
|
||||
virtual void postInit();
|
||||
virtual void think( int _frames );
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
||||
|
|
|
@ -81,6 +81,16 @@ void CNpcLanternPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
{
|
||||
init( startPos );
|
||||
}
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -116,7 +126,7 @@ void CNpcLanternPlatform::processMovement( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcLanternPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcLanternPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -127,4 +137,4 @@ const CRECT *CNpcLanternPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
||||
|
|
|
@ -22,7 +22,7 @@ class CNpcLanternPlatform : public CNpcPlatform
|
|||
{
|
||||
public:
|
||||
virtual void postInit();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
||||
virtual void processMovement( int _frames );
|
||||
|
|
|
@ -555,6 +555,16 @@ void CNpcPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
setWaypointCount( ThisPlatform->PointCount - 1 );
|
||||
|
||||
setWaypointPtr( waypoints );
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -125,6 +125,7 @@ public:
|
|||
virtual void jump() {;}
|
||||
virtual void leftThinkZone(int _frames);
|
||||
s16 getCollisionAngle() {return m_collisionAngle;}
|
||||
virtual CRECT const *getThinkBBox() {return &m_thinkArea;}
|
||||
|
||||
static NPC_PLATFORM_UNIT_TYPE getTypeFromMapEdit( u16 newType );
|
||||
static CNpcPlatform *Create(int Type);
|
||||
|
@ -246,6 +247,7 @@ protected:
|
|||
virtual void setCollisionAngle(int newAngle); // Actually.. this probly doesn't need to be in the base calss anymore.. :/
|
||||
s16 m_collisionAngle;
|
||||
|
||||
CRECT m_thinkArea;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -65,6 +65,16 @@ void CNpcLiftPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
PntList++;
|
||||
|
||||
m_maxExtension = ( ( newYPos << 4 ) + 16 ) - startPos.vy;
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -139,7 +139,7 @@ void CNpcLinearPlatform::processMovement( int _frames )
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcLinearPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcLinearPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -150,4 +150,4 @@ const CRECT *CNpcLinearPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
|
@ -22,7 +22,7 @@ class CNpcLinearPlatform : public CNpcPlatform
|
|||
{
|
||||
public:
|
||||
virtual void postInit();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void processMovement( int _frames );
|
||||
};
|
||||
|
|
|
@ -88,7 +88,14 @@ void CNpcPendulumPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
else
|
||||
{
|
||||
init( startPos );
|
||||
|
||||
m_length = 200;
|
||||
}
|
||||
|
||||
m_thinkArea.x1 = Pos.vx - m_length;
|
||||
m_thinkArea.x2 = Pos.vx + m_length;
|
||||
m_thinkArea.y1 = Pos.vy - m_length;
|
||||
m_thinkArea.y2 = Pos.vy + m_length;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -192,7 +199,7 @@ void CNpcPendulumPlatform::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcPendulumPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcPendulumPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -200,4 +207,4 @@ const CRECT *CNpcPendulumPlatform::getThinkBBox()
|
|||
objThinkBox.y1 = thinkBBox.YMax - 1;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
|
@ -23,7 +23,7 @@ class CNpcPendulumPlatform : public CNpcPlatform
|
|||
public:
|
||||
virtual void postInit();
|
||||
virtual void render();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
||||
virtual void processMovement( int _frames );
|
||||
|
|
|
@ -214,7 +214,7 @@ void CNpcRaftPlatform::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const CRECT *CNpcRaftPlatform::getThinkBBox()
|
||||
/*const CRECT *CNpcRaftPlatform::getThinkBBox()
|
||||
{
|
||||
CRECT objThinkBox = getCollisionArea();
|
||||
|
||||
|
@ -225,4 +225,4 @@ const CRECT *CNpcRaftPlatform::getThinkBBox()
|
|||
objThinkBox.y2 = thinkBBox.YMax;
|
||||
|
||||
return &objThinkBox;
|
||||
}
|
||||
}*/
|
|
@ -23,7 +23,7 @@ class CNpcRaftPlatform : public CNpcPlatform
|
|||
public:
|
||||
virtual void postInit();
|
||||
virtual void render();
|
||||
virtual CRECT const *getThinkBBox();
|
||||
//virtual CRECT const *getThinkBBox();
|
||||
protected:
|
||||
virtual void processMovement( int _frames );
|
||||
|
||||
|
|
|
@ -90,6 +90,16 @@ void CNpcRisingBridgePlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16, 100, 0 );
|
||||
//trigger->setTargetBox(TriggerList->TargetPos.X<<4,TriggerList->TargetPos.Y<<4,TriggerList->TargetSize.X<<4,TriggerList->TargetSize.Y<<4);
|
||||
trigger->setPlatform( this );
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -168,6 +168,16 @@ void CNpcSteamSwitchPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
trigger=(CSteamSwitchEmitterTrigger*)CTrigger::Create(CTrigger::TRIGGER_STEAM_SWITCH_EMITTER);
|
||||
trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16 - 50, 100, 100 );
|
||||
trigger->toggleVisible();
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -89,6 +89,16 @@ void CNpcTrapdoorPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
|||
|
||||
m_triggerPos.vx = newXPos;
|
||||
m_triggerPos.vy = newYPos;
|
||||
|
||||
s32 minX, maxX, minY, maxY;
|
||||
|
||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
||||
|
||||
m_thinkArea.x1 = minX;
|
||||
m_thinkArea.x2 = maxX;
|
||||
m_thinkArea.y1 = minY;
|
||||
m_thinkArea.y2 = maxY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue