This commit is contained in:
parent
2c35d52bd3
commit
2df8cb8a4b
5 changed files with 6 additions and 5 deletions
Binary file not shown.
Binary file not shown.
|
@ -365,7 +365,6 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
threshold = 16;
|
threshold = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if( playerPos.vx >= collisionArea.x1 && playerPos.vx <= collisionArea.x2 )
|
|
||||||
if( playerCollisionArea.x2 >= collisionArea.x1 && playerCollisionArea.x1 <= collisionArea.x2 )
|
if( playerCollisionArea.x2 >= collisionArea.x1 && playerCollisionArea.x1 <= collisionArea.x2 )
|
||||||
{
|
{
|
||||||
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
||||||
|
@ -401,6 +400,7 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
|
|
||||||
friendNpc = (CNpcFriend*) _thisThing;
|
friendNpc = (CNpcFriend*) _thisThing;
|
||||||
DVECTOR const &friendPos = friendNpc->getPos();
|
DVECTOR const &friendPos = friendNpc->getPos();
|
||||||
|
CRECT const &friendCollisionArea = friendNpc->getCollisionArea();
|
||||||
CRECT const &collisionArea=getCollisionArea();
|
CRECT const &collisionArea=getCollisionArea();
|
||||||
|
|
||||||
s32 threshold = abs( collisionArea.y2 - collisionArea.y1 );
|
s32 threshold = abs( collisionArea.y2 - collisionArea.y1 );
|
||||||
|
@ -410,7 +410,7 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
threshold = 16;
|
threshold = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( friendPos.vx >= collisionArea.x1 && friendPos.vx <= collisionArea.x2 )
|
if( friendCollisionArea.x2 >= collisionArea.x1 && friendCollisionArea.x1 <= collisionArea.x2 )
|
||||||
{
|
{
|
||||||
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1130,7 +1130,6 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
threshold = 16;
|
threshold = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if( playerPos.vx >= collisionArea.x1 && playerPos.vx <= collisionArea.x2 )
|
|
||||||
if( playerCollisionArea.x2 >= collisionArea.x1 && playerCollisionArea.x1 <= collisionArea.x2 )
|
if( playerCollisionArea.x2 >= collisionArea.x1 && playerCollisionArea.x1 <= collisionArea.x2 )
|
||||||
{
|
{
|
||||||
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
||||||
|
@ -1166,6 +1165,7 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
|
|
||||||
friendNpc = (CNpcFriend*) _thisThing;
|
friendNpc = (CNpcFriend*) _thisThing;
|
||||||
DVECTOR const &friendPos = friendNpc->getPos();
|
DVECTOR const &friendPos = friendNpc->getPos();
|
||||||
|
CRECT const &friendCollisionArea = friendNpc->getCollisionArea();
|
||||||
CRECT const &collisionArea=getCollisionArea();
|
CRECT const &collisionArea=getCollisionArea();
|
||||||
|
|
||||||
s32 threshold = abs( collisionArea.y2 - collisionArea.y1 );
|
s32 threshold = abs( collisionArea.y2 - collisionArea.y1 );
|
||||||
|
@ -1175,7 +1175,7 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
threshold = 16;
|
threshold = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( friendPos.vx >= collisionArea.x1 && friendPos.vx <= collisionArea.x2 )
|
if( friendCollisionArea.x2 >= collisionArea.x1 && friendCollisionArea.x1 <= collisionArea.x2 )
|
||||||
{
|
{
|
||||||
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -230,6 +230,7 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
|
|
||||||
friendNpc = (CNpcFriend*) _thisThing;
|
friendNpc = (CNpcFriend*) _thisThing;
|
||||||
DVECTOR const &friendPos = friendNpc->getPos();
|
DVECTOR const &friendPos = friendNpc->getPos();
|
||||||
|
CRECT const &friendCollisionArea = friendNpc->getCollisionArea();
|
||||||
CRECT const &collisionArea=getCollisionArea();
|
CRECT const &collisionArea=getCollisionArea();
|
||||||
|
|
||||||
s32 threshold = abs( collisionArea.y2 - collisionArea.y1 );
|
s32 threshold = abs( collisionArea.y2 - collisionArea.y1 );
|
||||||
|
@ -239,7 +240,7 @@ CRECT const &collisionArea=getCollisionArea();
|
||||||
threshold = 16;
|
threshold = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( friendPos.vx >= collisionArea.x1 && friendPos.vx <= collisionArea.x2 )
|
if( friendCollisionArea.x2 >= collisionArea.x1 && friendCollisionArea.x1 <= collisionArea.x2 )
|
||||||
{
|
{
|
||||||
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
if ( checkCollisionDelta( _thisThing, threshold, collisionArea ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue