This commit is contained in:
parent
a74745a7b2
commit
a4b8372440
19 changed files with 160 additions and 40 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue