This commit is contained in:
Daveo 2001-05-10 16:22:45 +00:00
parent 70435ce4f2
commit 5ad2557125

View file

@ -105,23 +105,9 @@ void CNpcBouncePlatform::render()
{ {
CPlatformThing::render(); CPlatformThing::render();
// Render if (canRender())
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 ( renderPos.vy + collisionRect.y2 >= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() )
{ {
DVECTOR &renderPos=getRenderPos();
SVECTOR rotation; SVECTOR rotation;
rotation.vx = 0; rotation.vx = 0;
rotation.vy = 0; rotation.vy = 0;
@ -159,6 +145,6 @@ void CNpcBouncePlatform::render()
DrawLine(x1,y1,x2,y2,0,255,0,0); DrawLine(x1,y1,x2,y2,0,255,0,0);
#endif #endif
} }
}
} }
} }