This commit is contained in:
parent
39b22270ac
commit
573321782a
8 changed files with 17 additions and 7 deletions
|
@ -25,6 +25,7 @@ public:
|
||||||
virtual void render();
|
virtual void render();
|
||||||
DVECTOR const &getWheelPos() {return( m_wheelPos );}
|
DVECTOR const &getWheelPos() {return( m_wheelPos );}
|
||||||
void setTriggered() {m_triggered = true;}
|
void setTriggered() {m_triggered = true;}
|
||||||
|
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
|
||||||
protected:
|
protected:
|
||||||
virtual void setWaypoints( sThingHazard *ThisHazard );
|
virtual void setWaypoints( sThingHazard *ThisHazard );
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
|
|
@ -29,6 +29,7 @@ public:
|
||||||
DVECTOR const &getWheelPos() {return( m_wheelPos );}
|
DVECTOR const &getWheelPos() {return( m_wheelPos );}
|
||||||
void linkToWeight( CNpcRisingWeightHazard *weight ) {m_weight = weight;}
|
void linkToWeight( CNpcRisingWeightHazard *weight ) {m_weight = weight;}
|
||||||
virtual void render();
|
virtual void render();
|
||||||
|
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
|
||||||
protected:
|
protected:
|
||||||
virtual void setWaypoints( sThingHazard *ThisHazard );
|
virtual void setWaypoints( sThingHazard *ThisHazard );
|
||||||
virtual void collidedWith(CThing *_thisThing);
|
virtual void collidedWith(CThing *_thisThing);
|
||||||
|
|
|
@ -36,6 +36,7 @@ public:
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
virtual void render();
|
virtual void render();
|
||||||
virtual void shutdown();
|
virtual void shutdown();
|
||||||
|
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
|
||||||
protected:
|
protected:
|
||||||
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
|
|
@ -128,15 +128,18 @@ void CNpcDualPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
||||||
m_otherPlatform->setLineBase( slavePos );
|
m_otherPlatform->setLineBase( slavePos );
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 minX, maxX, minY, maxY;
|
m_thinkArea.x1 = startPos.vx;
|
||||||
|
m_thinkArea.x2 = slavePos.vx;
|
||||||
|
|
||||||
m_npcPath.getPathXExtents( &minX, &maxX );
|
if ( m_thinkArea.x1 > m_thinkArea.x2 )
|
||||||
m_npcPath.getPathYExtents( &minY, &maxY );
|
{
|
||||||
|
int temp = m_thinkArea.x2;
|
||||||
|
m_thinkArea.x2 = m_thinkArea.x1;
|
||||||
|
m_thinkArea.x1 = temp;
|
||||||
|
}
|
||||||
|
|
||||||
m_thinkArea.x1 = minX;
|
m_thinkArea.y1 = startPos.vy;
|
||||||
m_thinkArea.x2 = maxX;
|
m_thinkArea.y2 = startPos.vy + m_maxExtension;
|
||||||
m_thinkArea.y1 = minY;
|
|
||||||
m_thinkArea.y2 = maxY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -23,6 +23,7 @@ class CNpcRisingBridgePlatform : public CNpcPlatform
|
||||||
public:
|
public:
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
virtual void trigger();
|
virtual void trigger();
|
||||||
|
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
|
||||||
protected:
|
protected:
|
||||||
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
|
|
@ -23,6 +23,7 @@ class CNpcSteerableBarrelPlatform : public CNpcPlatform
|
||||||
public:
|
public:
|
||||||
virtual void render();
|
virtual void render();
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
|
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
|
||||||
protected:
|
protected:
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
virtual void collidedWith(CThing *_thisThing);
|
virtual void collidedWith(CThing *_thisThing);
|
||||||
|
|
|
@ -23,6 +23,7 @@ class CNpcSeesawPlatform : public CNpcPlatform
|
||||||
public:
|
public:
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
virtual void render();
|
virtual void render();
|
||||||
|
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
|
||||||
protected:
|
protected:
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ public:
|
||||||
DVECTOR const &getTriggerPos() {return( m_triggerPos );}
|
DVECTOR const &getTriggerPos() {return( m_triggerPos );}
|
||||||
void setTriggered() {m_triggered = true;}
|
void setTriggered() {m_triggered = true;}
|
||||||
virtual void render();
|
virtual void render();
|
||||||
|
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
|
||||||
protected:
|
protected:
|
||||||
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
virtual void setWaypoints( sThingPlatform *ThisPlatform );
|
||||||
virtual void processMovement( int _frames );
|
virtual void processMovement( int _frames );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue