mirror of
https://github.com/halpz/re3.git
synced 2025-07-16 07:08:13 +00:00
CCopPed, except spike traps
This commit is contained in:
@ -88,6 +88,7 @@
|
||||
#include "Zones.h"
|
||||
#include "Occlusion.h"
|
||||
#include "debugmenu.h"
|
||||
#include "Ropes.h"
|
||||
|
||||
eLevelName CGame::currLevel;
|
||||
int32 CGame::currArea;
|
||||
@ -403,9 +404,11 @@ bool CGame::Initialise(const char* datFile)
|
||||
CRubbish::Init();
|
||||
CClouds::Init();
|
||||
CSpecialFX::Init();
|
||||
CRopes::Init();
|
||||
CWaterCannons::Init();
|
||||
CBridge::Init();
|
||||
CGarages::Init();
|
||||
LoadingScreen("Loading the Game", "Position dynamic objects", nil);
|
||||
LoadingScreen("Loading the Game", "Initialise vehicle paths", nil);
|
||||
CTrain::InitTrains();
|
||||
CPlane::InitPlanes();
|
||||
@ -416,6 +419,7 @@ bool CGame::Initialise(const char* datFile)
|
||||
if ( !TheMemoryCard.m_bWantToLoad )
|
||||
{
|
||||
#endif
|
||||
LoadingScreen("Loading the Game", "Start script", nil);
|
||||
CTheScripts::StartTestScript();
|
||||
CTheScripts::Process();
|
||||
TheCamera.Process();
|
||||
@ -426,6 +430,9 @@ bool CGame::Initialise(const char* datFile)
|
||||
CCollision::ms_collisionInMemory = currLevel;
|
||||
for (int i = 0; i < MAX_PADS; i++)
|
||||
CPad::GetPad(i)->Clear(true);
|
||||
// TODO(Miami)
|
||||
// DMAudio.SetStartingTrackPositions(1);
|
||||
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -546,6 +553,7 @@ void CGame::ReInitGameObjectVariables(void)
|
||||
CRemote::Init();
|
||||
#endif
|
||||
CSpecialFX::Init();
|
||||
CRopes::Init();
|
||||
CWaterCannons::Init();
|
||||
CParticle::ReloadConfig();
|
||||
|
||||
@ -718,6 +726,7 @@ void CGame::Process(void)
|
||||
CGarages::Update();
|
||||
CRubbish::Update();
|
||||
CSpecialFX::Update();
|
||||
CRopes::Update();
|
||||
CTimeCycle::Update();
|
||||
if (CReplay::ShouldStandardCameraBeProcessed())
|
||||
TheCamera.Process();
|
||||
|
@ -31,14 +31,14 @@ CRope::Update(void)
|
||||
for(i = 1; i < ARRAY_SIZE(m_pos); i++){
|
||||
CVector prevPos = m_pos[i];
|
||||
m_pos[i] += m_speed[i]*step*CTimer::GetTimeStep();
|
||||
m_pos[0].z -= 0.05f*CTimer::GetTimeStep();
|
||||
m_pos[i].z -= 0.05f*CTimer::GetTimeStep();
|
||||
CVector dist = m_pos[i] - m_pos[i-1];
|
||||
m_pos[i] = m_pos[i-1] + dist/dist.Magnitude()*0.625f;
|
||||
m_pos[i] = m_pos[i-1] + (0.625f/dist.Magnitude())*dist;
|
||||
m_speed[i] = (m_pos[i] - prevPos)/CTimer::GetTimeStep();
|
||||
}
|
||||
if(!m_bWasRegistered && m_pos[0].z < 0.0f)
|
||||
m_bActive = false;
|
||||
m_bWasRegistered = true;
|
||||
m_bWasRegistered = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -60,7 +60,11 @@ CRope::Render(void)
|
||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
|
||||
|
||||
if(RwIm3DTransform(TempBufferRenderVertices, ARRAY_SIZE(m_pos), nil, rwIM3D_VERTEXXYZ|rwIM3D_VERTEXRGBA)){
|
||||
#ifdef FIX_BUGS
|
||||
RwIm3DRenderIndexedPrimitive(rwPRIMTYPELINELIST, RopeIndices, 2*(ARRAY_SIZE(m_pos)-1));
|
||||
#else
|
||||
RwIm3DRenderIndexedPrimitive(rwPRIMTYPEPOLYLINE, RopeIndices, 2*(ARRAY_SIZE(m_pos)-1));
|
||||
#endif
|
||||
RwIm3DEnd();
|
||||
}
|
||||
}
|
||||
@ -159,7 +163,7 @@ CRopes::CreateRopeWithSwatComingDown(CVector pos)
|
||||
|
||||
if(!CStreaming::HasModelLoaded(MI_SWAT) || !RegisterRope(ropeId+100, pos, true))
|
||||
return false;
|
||||
CCopPed *swat = (CCopPed*)CPopulation::AddPed(PEDTYPE_COP, COP_ARMY, pos);
|
||||
CCopPed *swat = (CCopPed*)CPopulation::AddPed(PEDTYPE_COP, COP_HELI_SWAT, pos);
|
||||
swat->bUsesCollision = false;
|
||||
swat->m_pRopeEntity = (CEntity*)1;
|
||||
swat->m_nRopeID = 100 + ropeId;
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "SceneEdit.h"
|
||||
#include "debugmenu.h"
|
||||
#include "Occlusion.h"
|
||||
#include "Ropes.h"
|
||||
|
||||
GlobalScene Scene;
|
||||
|
||||
@ -873,6 +874,7 @@ RenderEffects(void)
|
||||
CGlass::Render();
|
||||
CWaterCannons::Render();
|
||||
CSpecialFX::Render();
|
||||
CRopes::Render();
|
||||
CShadows::RenderStaticShadows();
|
||||
CShadows::RenderStoredShadows();
|
||||
CSkidmarks::Render();
|
||||
|
Reference in New Issue
Block a user