mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-14 02:24:09 +00:00
Finished CCam; various smaller things
This commit is contained in:
parent
8703758a7b
commit
f0dfaac838
18 changed files with 4397 additions and 1266 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "debugmenu_public.h"
|
||||
#include "Particle.h"
|
||||
#include "Console.h"
|
||||
#include "Debug.h"
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
@ -114,13 +115,16 @@ SpawnCar(int id)
|
|||
CStreaming::LoadAllRequestedModels(false);
|
||||
if(CStreaming::HasModelLoaded(id)){
|
||||
playerpos = FindPlayerCoors();
|
||||
int node = ThePaths.FindNodeClosestToCoors(playerpos, 0, 100.0f, false, false);
|
||||
if(node < 0)
|
||||
return;
|
||||
int node;
|
||||
if(!CModelInfo::IsBoatModel(id)){
|
||||
node = ThePaths.FindNodeClosestToCoors(playerpos, 0, 100.0f, false, false);
|
||||
if(node < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
CVehicle *v;
|
||||
if(CModelInfo::IsBoatModel(id))
|
||||
return;
|
||||
v = new CBoat(id, RANDOM_VEHICLE);
|
||||
else
|
||||
v = new CAutomobile(id, RANDOM_VEHICLE);
|
||||
|
||||
|
@ -130,7 +134,11 @@ SpawnCar(int id)
|
|||
if(carCol2)
|
||||
DebugMenuEntrySetAddress(carCol2, &v->m_currentColour2);
|
||||
|
||||
v->GetPosition() = ThePaths.m_pathNodes[node].pos;
|
||||
if(CModelInfo::IsBoatModel(id))
|
||||
v->GetPosition() = TheCamera.GetPosition() + TheCamera.GetForward()*15.0f;
|
||||
else
|
||||
v->GetPosition() = ThePaths.m_pathNodes[node].pos;
|
||||
|
||||
v->GetPosition().z += 4.0f;
|
||||
v->SetOrientation(0.0f, 0.0f, 3.49f);
|
||||
v->m_status = STATUS_ABANDONED;
|
||||
|
@ -197,6 +205,12 @@ PlaceOnRoad(void)
|
|||
((CAutomobile*)veh)->PlaceOnRoadProperly();
|
||||
}
|
||||
|
||||
static void
|
||||
ResetCamStatics(void)
|
||||
{
|
||||
TheCamera.Cams[TheCamera.ActiveCam].ResetStatics = true;
|
||||
}
|
||||
|
||||
static const char *carnames[] = {
|
||||
"landstal", "idaho", "stinger", "linerun", "peren", "sentinel", "patriot", "firetruk", "trash", "stretch", "manana", "infernus", "blista", "pony",
|
||||
"mule", "cheetah", "ambulan", "fbicar", "moonbeam", "esperant", "taxi", "kuruma", "bobcat", "mrwhoop", "bfinject", "corpse", "police", "enforcer",
|
||||
|
@ -358,7 +372,13 @@ DebugMenuPopulate(void)
|
|||
|
||||
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
|
||||
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
|
||||
|
||||
|
||||
extern bool PrintDebugCode;
|
||||
extern int16 &DebugCamMode;
|
||||
DebugMenuAddVarBool8("Cam", "Print Debug Code", (int8*)&PrintDebugCode, nil);
|
||||
DebugMenuAddVar("Cam", "Cam Mode", &DebugCamMode, nil, 1, 0, CCam::MODE_EDITOR, nil);
|
||||
DebugMenuAddCmd("Cam", "Reset Statics", ResetCamStatics);
|
||||
|
||||
CTweakVars::AddDBG("Debug");
|
||||
}
|
||||
}
|
||||
|
@ -433,7 +453,8 @@ void re3_debug(const char *format, ...)
|
|||
vsprintf_s(re3_buff, re3_buffsize, format, va);
|
||||
va_end(va);
|
||||
|
||||
printf("%s", re3_buff);
|
||||
// printf("%s", re3_buff);
|
||||
CDebug::DebugAddText(re3_buff);
|
||||
}
|
||||
|
||||
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue