This commit is contained in:
parent
5b785068c2
commit
fa5105d783
96 changed files with 550 additions and 406 deletions
|
@ -19,6 +19,8 @@
|
|||
#include "level\layercollision.h"
|
||||
#endif
|
||||
|
||||
#include "game\game.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcBarrelHazard::init()
|
||||
|
@ -61,7 +63,7 @@ void CNpcBarrelHazard::processMovement( int _frames )
|
|||
{
|
||||
// check for vertical movement
|
||||
|
||||
groundHeight = m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
||||
groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
||||
|
||||
if ( groundHeight <= yMovement )
|
||||
{
|
||||
|
@ -83,7 +85,7 @@ void CNpcBarrelHazard::processMovement( int _frames )
|
|||
|
||||
distX = distX / abs( distX );
|
||||
|
||||
if ( m_layerCollision->getHeightFromGround( Pos.vx + ( distX * 3 * _frames ), Pos.vy ) < -maxHeight )
|
||||
if ( CGameScene::getCollision()->getHeightFromGround( Pos.vx + ( distX * 3 * _frames ), Pos.vy ) < -maxHeight )
|
||||
{
|
||||
// there is an obstacle in the way, increment the path point (hopefully this will resolve the problem)
|
||||
|
||||
|
@ -93,7 +95,7 @@ void CNpcBarrelHazard::processMovement( int _frames )
|
|||
{
|
||||
// check for vertical movement
|
||||
|
||||
groundHeight = m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
||||
groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
||||
|
||||
moveX = distX * 3 * _frames;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue