diff options
Diffstat (limited to 'src/core/AnimViewer.cpp')
-rw-r--r-- | src/core/AnimViewer.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp index c8d8cb56..d39be754 100644 --- a/src/core/AnimViewer.cpp +++ b/src/core/AnimViewer.cpp @@ -12,6 +12,7 @@ #include "General.h" #include "Camera.h" #include "Vehicle.h" +#include "Bike.h" #include "PlayerSkin.h" #include "PlayerInfo.h" #include "World.h" @@ -48,11 +49,9 @@ CAnimViewer::Render(void) { // pTarget->GetPosition() = CVector(0.0f, 0.0f, 0.0f); if (pTarget) { #ifdef FIX_BUGS -#ifdef PED_SKIN if(pTarget->IsPed()) ((CPed*)pTarget)->UpdateRpHAnim(); #endif -#endif pTarget->Render(); CRenderer::RenderOneNonRoad(pTarget); } @@ -91,19 +90,20 @@ CAnimViewer::Initialise(void) { CPedStats::Initialise(); CMessages::Init(); CdStreamAddImage("MODELS\\GTA3.IMG"); + CFileLoader::LoadLevel("DATA\\DEFAULT.DAT"); CFileLoader::LoadLevel("DATA\\ANIMVIEWER.DAT"); CStreaming::Init(); + for(int i = 0; i < MODELINFOSIZE; i++) + if(CModelInfo::GetModelInfo(i)) + CModelInfo::GetModelInfo(i)->ConvertAnimFileIndex(); CStreaming::LoadInitialPeds(); CStreaming::RequestSpecialModel(MI_PLAYER, "player", STREAMFLAGS_DONT_REMOVE); CStreaming::LoadAllRequestedModels(false); CRenderer::Init(); - CRadar::Initialise(); - CRadar::LoadTextures(); CVehicleModelInfo::LoadVehicleColours(); CAnimManager::LoadAnimFiles(); CWorld::PlayerInFocus = 0; CWeapon::InitialiseWeapons(); - CShadows::Init(); CPed::Initialise(); CTimer::Initialise(); CClock::Initialise(60000); @@ -136,11 +136,7 @@ CAnimViewer::Initialise(void) { } CFileMgr::CloseFile(fd); } else { - // From xbox - CStreaming::RequestSpecialChar(0, "luigi", STREAMFLAGS_DONT_REMOVE); - CStreaming::RequestSpecialChar(1, "joey", STREAMFLAGS_DONT_REMOVE); - CStreaming::RequestSpecialChar(2, "tony", STREAMFLAGS_DONT_REMOVE); - CStreaming::RequestSpecialChar(3, "curly", STREAMFLAGS_DONT_REMOVE); + // TODO? maybe request some special models here so the thing doesn't crash } } @@ -269,6 +265,8 @@ CAnimViewer::Update(void) pTarget = new CAutomobile(modelId, RANDOM_VEHICLE); } else if (veh->m_vehicleType == VEHICLE_TYPE_BOAT) { pTarget = new CBoat(modelId, RANDOM_VEHICLE); + } else if (veh->m_vehicleType == VEHICLE_TYPE_BIKE) { + pTarget = new CBike(modelId, RANDOM_VEHICLE); } else { pTarget = new CObject(modelId, true); if (!modelInfo->GetColModel()) { @@ -342,13 +340,7 @@ CAnimViewer::Update(void) CMessages::AddMessage(gUString, 1000, 0); // Originally it was GetPad(1)->LeftShoulder2 } else if (pad->NewState.Triangle) { -#ifdef PED_SKIN - if(IsClumpSkinned(pTarget->GetClump())) - ((CPedModelInfo *)CModelInfo::GetModelInfo(pTarget->GetModelIndex()))->AnimatePedColModelSkinned(pTarget->GetClump()); - else -#endif - CPedModelInfo::AnimatePedColModel(((CPedModelInfo *)CModelInfo::GetModelInfo(pTarget->GetModelIndex()))->GetHitColModel(), - RpClumpGetFrame(pTarget->GetClump())); + ((CPedModelInfo *)CModelInfo::GetModelInfo(pTarget->GetModelIndex()))->AnimatePedColModelSkinned(pTarget->GetClump()); AsciiToUnicode("Ped Col model will be animated as long as you hold the button", gUString); CMessages::AddMessage(gUString, 100, 0); } |