This commit is contained in:
parent
32b7f503c0
commit
51d9acda6e
1 changed files with 14 additions and 6 deletions
|
@ -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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue