mirror of
https://github.com/halpz/re3.git
synced 2025-07-25 15:22:47 +00:00
sync
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
#include "World.h"
|
||||
#include "Dummy.h"
|
||||
|
||||
void *CDummy::operator new(size_t sz) { return CPools::GetDummyPool()->New(); }
|
||||
void CDummy::operator delete(void *p, size_t sz) { CPools::GetDummyPool()->Delete((CDummy*)p); }
|
||||
void *CDummy::operator new(size_t sz) throw() { return CPools::GetDummyPool()->New(); }
|
||||
void CDummy::operator delete(void *p, size_t sz) throw() { CPools::GetDummyPool()->Delete((CDummy*)p); }
|
||||
|
||||
void
|
||||
CDummy::Add(void)
|
||||
|
@ -12,8 +12,8 @@ public:
|
||||
void Add(void);
|
||||
void Remove(void);
|
||||
|
||||
static void *operator new(size_t);
|
||||
static void operator delete(void*, size_t);
|
||||
static void *operator new(size_t) throw();
|
||||
static void operator delete(void*, size_t) throw();
|
||||
};
|
||||
|
||||
bool IsDummyPointerValid(CDummy* pDummy);
|
||||
|
@ -26,6 +26,12 @@
|
||||
#include "Ped.h"
|
||||
#include "Dummy.h"
|
||||
#include "WindModifiers.h"
|
||||
#include "SpecialFX.h"
|
||||
#include "VisibilityPlugins.h"
|
||||
#include "RpAnimBlend.h"
|
||||
#include "CutsceneMgr.h"
|
||||
|
||||
//--LCS: file done except TODO for distance alpha
|
||||
|
||||
int gBuildings;
|
||||
|
||||
@ -71,13 +77,18 @@ CEntity::CEntity(void)
|
||||
bDistanceFade = false;
|
||||
|
||||
m_flagE1 = false;
|
||||
m_flagE2 = false;
|
||||
bDontCastShadowsOn = false;
|
||||
bOffscreen = false;
|
||||
bIsStaticWaitingForCollision = false;
|
||||
bDontStream = false;
|
||||
bUnderwater = false;
|
||||
bHasPreRenderEffects = false;
|
||||
|
||||
bIsTreeModel = false;
|
||||
m_flagG2 = false;
|
||||
m_flagG4 = false;
|
||||
m_flagG8 = false;
|
||||
|
||||
m_scanCode = 0;
|
||||
m_modelIndex = -1;
|
||||
m_rwObject = nil;
|
||||
@ -96,6 +107,8 @@ void
|
||||
CEntity::SetModelIndex(uint32 id)
|
||||
{
|
||||
m_modelIndex = id;
|
||||
bIsTreeModel = IsTreeModel(m_modelIndex);
|
||||
bDrawLast |= bIsTreeModel;
|
||||
bHasPreRenderEffects = HasPreRenderEffects();
|
||||
CreateRwObject();
|
||||
}
|
||||
@ -104,6 +117,8 @@ void
|
||||
CEntity::SetModelIndexNoCreate(uint32 id)
|
||||
{
|
||||
m_modelIndex = id;
|
||||
bIsTreeModel = IsTreeModel(m_modelIndex);
|
||||
bDrawLast |= bIsTreeModel;
|
||||
bHasPreRenderEffects = HasPreRenderEffects();
|
||||
}
|
||||
|
||||
@ -122,10 +137,11 @@ CEntity::CreateRwObject(void)
|
||||
if(IsBuilding())
|
||||
gBuildings++;
|
||||
if(RwObjectGetType(m_rwObject) == rpATOMIC)
|
||||
m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false);
|
||||
GetMatrix().AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic *)m_rwObject)), false);
|
||||
else if(RwObjectGetType(m_rwObject) == rpCLUMP)
|
||||
m_matrix.AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false);
|
||||
GetMatrix().AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump *)m_rwObject)), false);
|
||||
|
||||
// useless IsTextureLoaded();
|
||||
mi->AddRef();
|
||||
}
|
||||
}
|
||||
@ -136,9 +152,9 @@ CEntity::AttachToRwObject(RwObject *obj)
|
||||
m_rwObject = obj;
|
||||
if(m_rwObject){
|
||||
if(RwObjectGetType(m_rwObject) == rpATOMIC)
|
||||
m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false);
|
||||
GetMatrix().Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic *)m_rwObject)), false);
|
||||
else if(RwObjectGetType(m_rwObject) == rpCLUMP)
|
||||
m_matrix.Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false);
|
||||
GetMatrix().Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump *)m_rwObject)), false);
|
||||
|
||||
CModelInfo::GetModelInfo(m_modelIndex)->AddRef();
|
||||
}
|
||||
@ -150,7 +166,7 @@ CEntity::DetachFromRwObject(void)
|
||||
if(m_rwObject)
|
||||
CModelInfo::GetModelInfo(m_modelIndex)->RemoveRef();
|
||||
m_rwObject = nil;
|
||||
m_matrix.Detach();
|
||||
GetMatrix().Detach();
|
||||
}
|
||||
|
||||
RpAtomic*
|
||||
@ -178,13 +194,15 @@ CEntity::DeleteRwObject(void)
|
||||
{
|
||||
RwFrame *f;
|
||||
|
||||
m_matrix.Detach();
|
||||
GetMatrix().Detach();
|
||||
if(m_rwObject){
|
||||
if(RwObjectGetType(m_rwObject) == rpATOMIC){
|
||||
f = RpAtomicGetFrame((RpAtomic*)m_rwObject);
|
||||
CStreaming::UnregisterInstance((RpAtomic*)m_rwObject, nil);
|
||||
RpAtomicDestroy((RpAtomic*)m_rwObject);
|
||||
RwFrameDestroy(f);
|
||||
}else if(RwObjectGetType(m_rwObject) == rpCLUMP){
|
||||
CStreaming::UnregisterInstance((RpClump*)m_rwObject);
|
||||
if(IsClumpSkinned((RpClump*)m_rwObject))
|
||||
RpClumpForAllAtomics((RpClump*)m_rwObject, AtomicRemoveAnimFromSkinCB, nil);
|
||||
RpClumpDestroy((RpClump*)m_rwObject);
|
||||
@ -201,18 +219,18 @@ CEntity::GetBoundRect(void)
|
||||
{
|
||||
CRect rect;
|
||||
CVector v;
|
||||
CColModel *col = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel();
|
||||
CColModel *col = CModelInfo::GetColModel(m_modelIndex);
|
||||
|
||||
rect.ContainPoint(m_matrix * col->boundingBox.min);
|
||||
rect.ContainPoint(m_matrix * col->boundingBox.max);
|
||||
rect.ContainPoint(GetMatrix() * col->boundingBox.min);
|
||||
rect.ContainPoint(GetMatrix() * col->boundingBox.max);
|
||||
|
||||
v = col->boundingBox.min;
|
||||
v.x = col->boundingBox.max.x;
|
||||
rect.ContainPoint(m_matrix * v);
|
||||
rect.ContainPoint(GetMatrix() * v);
|
||||
|
||||
v = col->boundingBox.max;
|
||||
v.x = col->boundingBox.min.x;
|
||||
rect.ContainPoint(m_matrix * v);
|
||||
rect.ContainPoint(GetMatrix() * v);
|
||||
|
||||
return rect;
|
||||
}
|
||||
@ -220,21 +238,27 @@ CEntity::GetBoundRect(void)
|
||||
CVector
|
||||
CEntity::GetBoundCentre(void)
|
||||
{
|
||||
CVector v;
|
||||
GetBoundCentre(v);
|
||||
return v;
|
||||
return GetMatrix() * CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center;
|
||||
}
|
||||
|
||||
#ifdef GTA_PS2
|
||||
void
|
||||
CEntity::GetBoundCentre(CVuVector &out)
|
||||
{
|
||||
TransformPoint(out, GetMatrix(), CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center);
|
||||
}
|
||||
#else
|
||||
void
|
||||
CEntity::GetBoundCentre(CVector &out)
|
||||
{
|
||||
out = m_matrix * CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingSphere.center;
|
||||
out = GetMatrix() * CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center;
|
||||
}
|
||||
#endif
|
||||
|
||||
float
|
||||
CEntity::GetBoundRadius(void)
|
||||
{
|
||||
return CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingSphere.radius;
|
||||
return CModelInfo::GetColModel(m_modelIndex)->boundingSphere.radius;
|
||||
}
|
||||
|
||||
void
|
||||
@ -244,9 +268,18 @@ CEntity::UpdateRwFrame(void)
|
||||
RwFrameUpdateObjects((RwFrame*)rwObjectGetParent(m_rwObject));
|
||||
}
|
||||
|
||||
bool
|
||||
PauseEntityAnims(void)
|
||||
{
|
||||
return CSpecialFX::bSnapShotActive;
|
||||
}
|
||||
|
||||
void
|
||||
CEntity::UpdateRpHAnim(void)
|
||||
{
|
||||
if(PauseEntityAnims())
|
||||
return;
|
||||
|
||||
if(IsClumpSkinned(GetClump())){
|
||||
RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(GetClump());
|
||||
RpHAnimHierarchyUpdateMatrices(hier);
|
||||
@ -308,9 +341,10 @@ CEntity::PreRender(void)
|
||||
if(!bHasPreRenderEffects)
|
||||
return;
|
||||
|
||||
// separate function in LCS but we don't know the name
|
||||
switch(m_type){
|
||||
case ENTITY_TYPE_BUILDING:
|
||||
if(IsTreeModel(GetModelIndex())){
|
||||
if(bIsTreeModel){
|
||||
float dist = (TheCamera.GetPosition() - GetPosition()).Magnitude2D();
|
||||
CObject::fDistToNearestTree = Min(CObject::fDistToNearestTree, dist);
|
||||
ModifyMatrixForTreeInWind();
|
||||
@ -373,7 +407,7 @@ CEntity::PreRender(void)
|
||||
CVector pos = GetPosition();
|
||||
CShadows::StoreShadowToBeRendered(SHADOWTYPE_DARK,
|
||||
gpShadowPedTex, &pos,
|
||||
0.4f, 0.0f, 0.0f, -0.4f,
|
||||
0.4f, 0.0f, 0.0f, 0.4f,
|
||||
CTimeCycle::GetShadowStrength(),
|
||||
CTimeCycle::GetShadowStrength(),
|
||||
CTimeCycle::GetShadowStrength(),
|
||||
@ -409,19 +443,65 @@ void
|
||||
CEntity::Render(void)
|
||||
{
|
||||
if(m_rwObject){
|
||||
bImBeingRendered = true;
|
||||
if(RwObjectGetType(m_rwObject) == rpATOMIC)
|
||||
RpAtomicRender((RpAtomic*)m_rwObject);
|
||||
else
|
||||
RpClumpRender((RpClump*)m_rwObject);
|
||||
bImBeingRendered = false;
|
||||
if(CVisibilityPlugins::GetObjectDistanceAlpha(m_rwObject) != 0){
|
||||
// NB: LCS does not use bImBeingRendered here,
|
||||
// but that may be due to the streamed world. better keep it for safety
|
||||
bImBeingRendered = true;
|
||||
if(RwObjectGetType(m_rwObject) == rpATOMIC)
|
||||
RpAtomicRender((RpAtomic*)m_rwObject);
|
||||
else
|
||||
RpClumpRender((RpClump*)m_rwObject);
|
||||
bImBeingRendered = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CEntity::UpdateDistanceFade(void)
|
||||
{
|
||||
// TODO(LCS):
|
||||
// increasing and decreasing alpha depending on bDistanceFade doesn't make any sense
|
||||
// so disable this whole thing until it does.
|
||||
return;
|
||||
int alpha = CVisibilityPlugins::GetObjectDistanceAlpha(m_rwObject);
|
||||
if(CCutsceneMgr::IsRunning() || TheCamera.WorldViewerBeingUsed)
|
||||
alpha = 255;
|
||||
else if(bDistanceFade)
|
||||
alpha = Max(alpha-16, 0);
|
||||
else if(alpha < 255)
|
||||
alpha = Min(alpha+32, 255);
|
||||
CVisibilityPlugins::SetObjectDistanceAlpha(m_rwObject, alpha);
|
||||
}
|
||||
|
||||
void
|
||||
CEntity::UpdateAnim(void)
|
||||
{
|
||||
if(PauseEntityAnims())
|
||||
return;
|
||||
|
||||
if(m_rwObject && RwObjectGetType(m_rwObject) == rpCLUMP && RpAnimBlendClumpGetFirstAssociation(GetClump())) {
|
||||
if (IsObject())
|
||||
RpAnimBlendClumpUpdateAnimations(GetClump(), CTimer::GetTimeStepNonClippedInSeconds());
|
||||
else {
|
||||
if (!bOffscreen)
|
||||
bOffscreen = !GetIsOnScreen();
|
||||
RpAnimBlendClumpUpdateAnimations(GetClump(), CTimer::GetTimeStepInSeconds(), !bOffscreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
CEntity::GetIsTouching(CVector const ¢er, float radius)
|
||||
CEntity::GetIsTouching(CVUVECTOR const ¢er, float radius)
|
||||
{
|
||||
return sq(GetBoundRadius()+radius) > (GetBoundCentre()-center).MagnitudeSqr();
|
||||
CVUVECTOR boundCenter;
|
||||
GetBoundCentre(boundCenter);
|
||||
return sq(GetBoundRadius()+radius) > (boundCenter-center).MagnitudeSqr();
|
||||
}
|
||||
|
||||
bool
|
||||
CEntity::GetIsTouching(CEntity *other)
|
||||
{
|
||||
return sq(GetBoundRadius()+other->GetBoundRadius()) > (GetBoundCentre()-other->GetBoundCentre()).MagnitudeSqr();
|
||||
}
|
||||
|
||||
bool
|
||||
@ -439,8 +519,7 @@ CEntity::IsVisibleComplex(void)
|
||||
bool
|
||||
CEntity::GetIsOnScreen(void)
|
||||
{
|
||||
return TheCamera.IsSphereVisible(GetBoundCentre(), GetBoundRadius(),
|
||||
&TheCamera.GetCameraMatrix());
|
||||
return TheCamera.IsSphereVisible(GetBoundCentre(), GetBoundRadius());
|
||||
}
|
||||
|
||||
bool
|
||||
@ -456,7 +535,7 @@ CEntity::GetIsOnScreenComplex(void)
|
||||
return true;
|
||||
|
||||
CRect rect = GetBoundRect();
|
||||
CColModel *colmodel = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel();
|
||||
CColModel *colmodel = CModelInfo::GetColModel(m_modelIndex);
|
||||
float z = GetPosition().z;
|
||||
float minz = z + colmodel->boundingBox.min.z;
|
||||
float maxz = z + colmodel->boundingBox.max.z;
|
||||
@ -611,7 +690,7 @@ CEntity::Remove(void)
|
||||
float
|
||||
CEntity::GetDistanceFromCentreOfMassToBaseOfModel(void)
|
||||
{
|
||||
return -CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingBox.min.z;
|
||||
return -CModelInfo::GetColModel(m_modelIndex)->boundingBox.min.z;
|
||||
}
|
||||
|
||||
void
|
||||
@ -737,11 +816,6 @@ CEntity::PreRenderForGlassWindow(void)
|
||||
bIsVisible = false;
|
||||
}
|
||||
|
||||
/*
|
||||
0x487A10 - SetAtomicAlphaCB
|
||||
0x4879E0 - SetClumpAlphaCB
|
||||
*/
|
||||
|
||||
RpMaterial*
|
||||
SetAtomicAlphaCB(RpMaterial *material, void *data)
|
||||
{
|
||||
@ -840,7 +914,7 @@ CEntity::SaveEntityFlags(uint8*& buf)
|
||||
if (bDistanceFade) tmp |= BIT(7);
|
||||
|
||||
if (m_flagE1) tmp |= BIT(8);
|
||||
if (m_flagE2) tmp |= BIT(9);
|
||||
if (bDontCastShadowsOn) tmp |= BIT(9);
|
||||
if (bOffscreen) tmp |= BIT(10);
|
||||
if (bIsStaticWaitingForCollision) tmp |= BIT(11);
|
||||
if (bDontStream) tmp |= BIT(12);
|
||||
@ -896,7 +970,7 @@ CEntity::LoadEntityFlags(uint8*& buf)
|
||||
bDistanceFade = !!(tmp & BIT(7));
|
||||
|
||||
m_flagE1 = !!(tmp & BIT(8));
|
||||
m_flagE2 = !!(tmp & BIT(9));
|
||||
bDontCastShadowsOn = !!(tmp & BIT(9));
|
||||
bOffscreen = !!(tmp & BIT(10));
|
||||
bIsStaticWaitingForCollision = !!(tmp & BIT(11));
|
||||
bDontStream = !!(tmp & BIT(12));
|
||||
|
@ -45,6 +45,7 @@ private:
|
||||
uint32 m_status : 5;
|
||||
public:
|
||||
// flagsA
|
||||
// LCS flagsB 02
|
||||
uint32 bUsesCollision : 1; // does entity use collision
|
||||
uint32 bCollisionProcessed : 1; // has object been processed by a ProcessEntityCollision function
|
||||
uint32 bIsStatic : 1; // is entity static
|
||||
@ -52,6 +53,7 @@ public:
|
||||
uint32 bPedPhysics : 1;
|
||||
uint32 bIsStuck : 1; // is entity stuck
|
||||
uint32 bIsInSafePosition : 1; // is entity in a collision free safe position
|
||||
// LCS flagsC
|
||||
uint32 bUseCollisionRecords : 1;
|
||||
|
||||
// flagsB
|
||||
@ -62,6 +64,7 @@ public:
|
||||
uint32 bRenderScorched : 1;
|
||||
uint32 bHasBlip : 1;
|
||||
uint32 bIsBIGBuilding : 1; // Set if this entity is a big building
|
||||
// LCS flagsD
|
||||
uint32 bStreamBIGBuilding : 1; // set when draw dist <= 2000
|
||||
|
||||
// flagsC
|
||||
@ -72,6 +75,7 @@ public:
|
||||
uint32 bMeleeProof : 1;
|
||||
uint32 bOnlyDamagedByPlayer : 1;
|
||||
uint32 bStreamingDontDelete : 1; // Dont let the streaming remove this
|
||||
// LCS flagsE
|
||||
uint32 bRemoveFromWorld : 1; // remove this entity next time it should be processed
|
||||
|
||||
// flagsD
|
||||
@ -82,17 +86,24 @@ public:
|
||||
uint32 bDrawLast : 1; // draw object last
|
||||
uint32 bNoBrightHeadLights : 1;
|
||||
uint32 bDoNotRender : 1; //-- only applies to CObjects apparently
|
||||
// LCS flagsF
|
||||
uint32 bDistanceFade : 1; // Fade entity because it is far away
|
||||
|
||||
// flagsE
|
||||
uint32 m_flagE1 : 1;
|
||||
uint32 m_flagE2 : 1;
|
||||
uint32 bDontCastShadowsOn : 1; // Dont cast shadows on this object
|
||||
uint32 bOffscreen : 1; // offscreen flag. This can only be trusted when it is set to true
|
||||
uint32 bIsStaticWaitingForCollision : 1; // this is used by script created entities - they are static until the collision is loaded below them
|
||||
uint32 bDontStream : 1; // tell the streaming not to stream me
|
||||
uint32 bUnderwater : 1; // this object is underwater change drawing order
|
||||
uint32 bHasPreRenderEffects : 1; // Object has a prerender effects attached to it
|
||||
|
||||
// LCS flagsG
|
||||
uint32 bIsTreeModel : 1;
|
||||
uint32 m_flagG2 : 1;
|
||||
uint32 m_flagG4 : 1;
|
||||
uint32 m_flagG8 : 1;
|
||||
|
||||
uint16 m_scanCode;
|
||||
uint16 m_randomSeed;
|
||||
int16 m_modelIndex;
|
||||
@ -120,6 +131,7 @@ public:
|
||||
|
||||
virtual void Add(void);
|
||||
virtual void Remove(void);
|
||||
virtual bool UpdatesInCutscene(void) { return false; }
|
||||
virtual void SetModelIndex(uint32 id);
|
||||
virtual void SetModelIndexNoCreate(uint32 id);
|
||||
virtual void CreateRwObject(void);
|
||||
@ -131,6 +143,7 @@ public:
|
||||
virtual void Teleport(CVector v) {}
|
||||
virtual void PreRender(void);
|
||||
virtual void Render(void);
|
||||
virtual void UpdateAnim(void);
|
||||
virtual bool SetupLighting(void);
|
||||
virtual void RemoveLighting(bool);
|
||||
virtual void FlagToDestroyWhenNextProcessed(void) {}
|
||||
@ -150,11 +163,13 @@ public:
|
||||
return (RpClump*)m_rwObject;
|
||||
}
|
||||
|
||||
void GetBoundCentre(CVector &out);
|
||||
void UpdateDistanceFade(void);
|
||||
void GetBoundCentre(CVUVECTOR &out);
|
||||
CVector GetBoundCentre(void);
|
||||
float GetBoundRadius(void);
|
||||
float GetDistanceFromCentreOfMassToBaseOfModel(void);
|
||||
bool GetIsTouching(CVector const ¢er, float r);
|
||||
bool GetIsTouching(CVUVECTOR const ¢er, float r);
|
||||
bool GetIsTouching(CEntity *other);
|
||||
bool GetIsOnScreen(void);
|
||||
bool GetIsOnScreenComplex(void);
|
||||
bool IsVisible(void);
|
||||
|
@ -224,7 +224,7 @@ CPhysical::RemoveAndAdd(void)
|
||||
CRect
|
||||
CPhysical::GetBoundRect(void)
|
||||
{
|
||||
CVector center;
|
||||
CVUVECTOR center;
|
||||
float radius;
|
||||
GetBoundCentre(center);
|
||||
radius = GetBoundRadius();
|
||||
@ -463,7 +463,7 @@ CPhysical::ApplyMoveForce(float jx, float jy, float jz)
|
||||
void
|
||||
CPhysical::ApplyTurnForce(float jx, float jy, float jz, float px, float py, float pz)
|
||||
{
|
||||
CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass);
|
||||
CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass);
|
||||
CVector turnimpulse = CrossProduct(CVector(px, py, pz)-com, CVector(jx, jy, jz));
|
||||
m_vecTurnSpeed += turnimpulse*(1.0f/m_fTurnMass);
|
||||
m_vecTurnSpeed.x = clamp(m_vecTurnSpeed.x, -4.0f, 4.0f);
|
||||
@ -482,7 +482,7 @@ CPhysical::ApplyFrictionMoveForce(float jx, float jy, float jz)
|
||||
void
|
||||
CPhysical::ApplyFrictionTurnForce(float jx, float jy, float jz, float px, float py, float pz)
|
||||
{
|
||||
CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass);
|
||||
CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass);
|
||||
CVector turnimpulse = CrossProduct(CVector(px, py, pz)-com, CVector(jx, jy, jz));
|
||||
m_vecTurnFriction += turnimpulse*(1.0f/m_fTurnMass);
|
||||
}
|
||||
@ -1046,7 +1046,7 @@ CPhysical::ApplyCollisionAlt(CEntity *B, CColPoint &colpoint, float &impulse, CV
|
||||
moveSpeed += vImpulse * (1.0f/m_fMass);
|
||||
|
||||
// ApplyTurnForce
|
||||
CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass);
|
||||
CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass);
|
||||
CVector turnimpulse = CrossProduct(pointpos-com, vImpulse);
|
||||
turnSpeed += turnimpulse*(1.0f/m_fTurnMass);
|
||||
|
||||
@ -1282,7 +1282,7 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists)
|
||||
CPhysical *A, *B;
|
||||
CObject *Bobj;
|
||||
bool canshift;
|
||||
CVector center;
|
||||
CVUVECTOR center;
|
||||
float radius;
|
||||
|
||||
int numCollisions;
|
||||
@ -1441,7 +1441,7 @@ CPhysical::ProcessCollisionSectorList_SimpleCar(CPtrList *lists)
|
||||
{
|
||||
static CColPoint aColPoints[MAX_COLLISION_POINTS];
|
||||
float radius;
|
||||
CVector center;
|
||||
CVUVECTOR center;
|
||||
int listtype;
|
||||
CPhysical *A, *B;
|
||||
int numCollisions;
|
||||
@ -1608,7 +1608,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists)
|
||||
{
|
||||
static CColPoint aColPoints[MAX_COLLISION_POINTS];
|
||||
float radius;
|
||||
CVector center;
|
||||
CVUVECTOR center;
|
||||
CPtrList *list;
|
||||
CPhysical *A, *B;
|
||||
CObject *Aobj, *Bobj;
|
||||
|
Reference in New Issue
Block a user