This commit is contained in:
Charles 2001-04-24 22:58:43 +00:00
parent 32b7f503c0
commit 51d9acda6e

View file

@ -30,25 +30,24 @@ void CNpcPendulumPlatform::postInit()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DVECTOR startPos;
DVECTOR pivotPos;
void CNpcPendulumPlatform::setWaypoints( sThingPlatform *ThisPlatform ) void CNpcPendulumPlatform::setWaypoints( sThingPlatform *ThisPlatform )
{ {
int pointNum; int pointNum;
u16 *PntList=(u16*)MakePtr(ThisPlatform,sizeof(sThingPlatform)); u16 *PntList=(u16*)MakePtr(ThisPlatform,sizeof(sThingPlatform));
u16 initYPos, newXPos, newYPos; u16 newXPos, newYPos;
newXPos = (u16) *PntList; newXPos = (u16) *PntList;
PntList++; PntList++;
initYPos = newYPos = (u16) *PntList; newYPos = (u16) *PntList;
PntList++; PntList++;
DVECTOR startPos;
startPos.vx = newXPos << 4; startPos.vx = newXPos << 4;
startPos.vy = newYPos << 4; startPos.vy = newYPos << 4;
init( startPos );
if ( ThisPlatform->PointCount > 1 ) if ( ThisPlatform->PointCount > 1 )
{ {
newXPos = (u16) *PntList; newXPos = (u16) *PntList;
@ -56,7 +55,16 @@ void CNpcPendulumPlatform::setWaypoints( sThingPlatform *ThisPlatform )
newYPos = (u16) *PntList; newYPos = (u16) *PntList;
PntList++; PntList++;
m_length = ( newYPos - initYPos ) << 4; pivotPos.vx = newXPos << 4;
pivotPos.vy = newYPos << 4;
m_length = startPos.vy - pivotPos.vy;
init( pivotPos );
}
else
{
init( startPos );
} }
} }