This commit is contained in:
parent
70435ce4f2
commit
5ad2557125
1 changed files with 12 additions and 26 deletions
|
@ -105,23 +105,9 @@ void CNpcBouncePlatform::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 ( renderPos.vy + collisionRect.y2 >= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() )
|
||||
if (canRender())
|
||||
{
|
||||
DVECTOR &renderPos=getRenderPos();
|
||||
SVECTOR rotation;
|
||||
rotation.vx = 0;
|
||||
rotation.vy = 0;
|
||||
|
@ -159,6 +145,6 @@ void CNpcBouncePlatform::render()
|
|||
DrawLine(x1,y1,x2,y2,0,255,0,0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue