This commit is contained in:
Charles 2001-05-05 14:58:49 +00:00
parent a74745a7b2
commit a4b8372440
19 changed files with 160 additions and 40 deletions

View file

@ -225,9 +225,15 @@ void CNpcBranchPlatform::render()
renderPos.vx = Pos.vx - offset.vx ;
renderPos.vy = Pos.vy - offset.vy ;
if ( renderPos.vx >= 0 && renderPos.vx <= VidGetScrW() )
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 >= 0 && renderPos.vy <= VidGetScrH() )
if ( renderPos.vy + collisionRect.y2 >= 0 && renderPos.vy + collisionRect.y1 <= VidGetScrH() )
{
SVECTOR rotation;
rotation.vx = 0;