This commit is contained in:
Daveo 2001-05-10 16:16:57 +00:00
parent 0b65d9d4a7
commit c110d56dc5
15 changed files with 403 additions and 536 deletions

View file

@ -117,34 +117,21 @@ void CNpcSeesawPlatform::render()
{
CPlatformThing::render();
// Render
DVECTOR renderPos;
DVECTOR offset = CLevel::getCameraPos();
renderPos.vx = Pos.vx - offset.vx;
renderPos.vy = Pos.vy - offset.vy;
CRECT collisionRect = getCollisionArea();
collisionRect.x1 -= Pos.vx;
collisionRect.x2 -= Pos.vx;
collisionRect.y1 -= Pos.vy;
collisionRect.y2 -= Pos.vy;
if ( renderPos.vx + collisionRect.x2 >= 0 && renderPos.vx + collisionRect.x1 <= VidGetScrW() )
if (canRender())
{
if ( renderPos.vy + collisionRect.y2 >= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() )
{
SVECTOR rotation;
rotation.vx = 0;
rotation.vy = 0;
rotation.vz = getCollisionAngle();
DVECTOR &renderPos=getRenderPos();
SVECTOR rotation;
VECTOR scale;
scale.vx = ONE;
scale.vy = ONE;
scale.vz = ONE;
rotation.vx = 0;
rotation.vy = 0;
rotation.vz = getCollisionAngle();
m_modelGfx->Render(renderPos,&rotation,&scale);
VECTOR scale;
scale.vx = ONE;
scale.vy = ONE;
scale.vz = ONE;
m_modelGfx->Render(renderPos,&rotation,&scale);
#if defined (__USER_paul__) || defined (__USER_charles__)
DVECTOR size;
@ -170,7 +157,6 @@ void CNpcSeesawPlatform::render()
DrawLine(x1,y1,x2,y2,0,255,0,0);
#endif
}
}
}
}