2001-05-04 22:28:30 +02:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
hmower.cpp
|
|
|
|
|
|
|
|
Author: CRB
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
|
|
#ifndef __HAZARD_HMOWER_H__
|
|
|
|
#include "hazard\hmower.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __VID_HEADER_
|
|
|
|
#include "system\vid.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __LEVEL_LEVEL_H__
|
|
|
|
#include "level\level.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void CNpcMowerHazard::init()
|
|
|
|
{
|
|
|
|
CNpcHazard::init();
|
|
|
|
|
|
|
|
m_rotation = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void CNpcMowerHazard::processMovement( int _frames )
|
|
|
|
{
|
|
|
|
m_rotation += 256 * _frames;
|
|
|
|
m_rotation &= 4095;
|
2001-06-01 18:30:37 +02:00
|
|
|
|
|
|
|
CSoundMediator::playSfx( CSoundMediator::SFX_SAW );
|
2001-05-04 22:28:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void CNpcMowerHazard::render()
|
|
|
|
{
|
|
|
|
CHazardThing::render();
|
|
|
|
|
2001-05-14 23:08:03 +02:00
|
|
|
if (canRender())
|
|
|
|
{
|
|
|
|
DVECTOR &renderPos=getRenderPos();
|
2001-05-04 22:28:30 +02:00
|
|
|
|
2001-05-14 23:08:03 +02:00
|
|
|
SVECTOR rotation;
|
|
|
|
rotation.vx = 0;
|
|
|
|
rotation.vy = 0;
|
|
|
|
rotation.vz = m_rotation;
|
2001-05-04 22:28:30 +02:00
|
|
|
|
2001-05-14 23:08:03 +02:00
|
|
|
VECTOR scale;
|
|
|
|
scale.vx = ONE;
|
|
|
|
scale.vy = ONE;
|
|
|
|
scale.vz = ONE;
|
2001-05-05 16:58:49 +02:00
|
|
|
|
2001-05-14 23:08:03 +02:00
|
|
|
m_modelGfx->Render(renderPos,&rotation,&scale);
|
2001-05-04 22:28:30 +02:00
|
|
|
}
|
|
|
|
}
|