SBSPSS/source/platform/pdrop.cpp
Charles 57b4d19ca6
2001-06-29 14:19:28 +00:00

38 lines
785 B
C++

/*=========================================================================
pdrop.cpp
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PLATFORM_PDROP_H__
#include "platform\pdrop.h"
#endif
#ifndef __GAME_GAME_H__
#include "game\game.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcDropPlatform::processMovement( int _frames )
{
s32 moveY = m_speed * _frames;
s32 groundHeight = CGameScene::getCollision()->getHeightFromGround( Pos.vx, Pos.vy + moveY, 16 );
if ( groundHeight < moveY )
{
moveY = groundHeight;
}
Pos.vy += moveY;
}