From 58c6bd567e879fee5a73771ffc1ffa35c3c13bc8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 24 Apr 2001 19:14:52 +0000 Subject: [PATCH] --- source/hazard/hpendulm.cpp | 5 +++-- source/hazard/hpendulm.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/hazard/hpendulm.cpp b/source/hazard/hpendulm.cpp index ce81a6f28..186ad23ca 100644 --- a/source/hazard/hpendulm.cpp +++ b/source/hazard/hpendulm.cpp @@ -24,6 +24,7 @@ void CNpcPendulumHazard::init() m_extendDir = EXTEND_LEFT; m_extension = 0; m_heading = 1024; + m_length = 200; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -53,6 +54,6 @@ void CNpcPendulumHazard::processMovement( int _frames ) } } - Pos.vx = m_base.vx + ( ( 100 * rcos( m_heading + m_extension ) ) >> 12 ); - Pos.vy = m_base.vy + ( ( 100 * rsin( m_heading + m_extension ) ) >> 12 ); + Pos.vx = m_base.vx + ( ( m_length * rcos( m_heading + m_extension ) ) >> 12 ); + Pos.vy = m_base.vy + ( ( m_length * rsin( m_heading + m_extension ) ) >> 12 ); } \ No newline at end of file diff --git a/source/hazard/hpendulm.h b/source/hazard/hpendulm.h index fbc69efe0..2c75ce669 100644 --- a/source/hazard/hpendulm.h +++ b/source/hazard/hpendulm.h @@ -24,6 +24,8 @@ public: void init(); protected: void processMovement( int _frames ); + + s32 m_length; }; #endif \ No newline at end of file