This commit is contained in:
parent
7c42177848
commit
c2d7d07d8b
20 changed files with 261 additions and 844 deletions
|
@ -28,17 +28,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcSteerableBarrelPlatform::postInit()
|
||||
{
|
||||
CNpcPlatform::postInit();
|
||||
|
||||
sBBox boundingBox = m_modelGfx->GetBBox();
|
||||
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), PLATFORMCOLLISIONHEIGHT + ( boundingBox.YMax - boundingBox.YMin ) );
|
||||
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( ( boundingBox.YMax + boundingBox.YMin ) >> 1 ) - 32 );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcSteerableBarrelPlatform::processMovement( int _frames )
|
||||
|
@ -134,31 +123,6 @@ void CNpcSteerableBarrelPlatform::render()
|
|||
scale.vz = ONE;
|
||||
|
||||
m_modelGfx->Render(renderPos,&rotation,&scale);
|
||||
|
||||
#if defined (__USER_paul__) || defined (__USER_charles__)
|
||||
DVECTOR size;
|
||||
DVECTOR centre;
|
||||
int halfLength;
|
||||
int x1,y1,x2,y2;
|
||||
|
||||
centre=getCollisionCentre();
|
||||
size=getCollisionSize();
|
||||
halfLength=size.vx>>1;
|
||||
|
||||
x1=-halfLength*mcos(getCollisionAngle()&4095)>>12;
|
||||
y1=-halfLength*msin(getCollisionAngle()&4095)>>12;
|
||||
x2=+halfLength*mcos(getCollisionAngle()&4095)>>12;
|
||||
y2=+halfLength*msin(getCollisionAngle()&4095)>>12;
|
||||
|
||||
centre.vx-=offset.vx;
|
||||
centre.vy-=offset.vy;
|
||||
x1+=centre.vx;
|
||||
y1+=centre.vy;
|
||||
x2+=centre.vx;
|
||||
y2+=centre.vy;
|
||||
|
||||
DrawLine(x1,y1,x2,y2,0,255,0,0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue