1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-29 04:58:41 +00:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Nikolay Korolev 2019-07-20 16:19:33 +03:00
commit be8e29e4e2
10 changed files with 23 additions and 25 deletions

View file

@ -116,14 +116,13 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
for(i = 0; i < animBlock->numAnims; i++){ for(i = 0; i < animBlock->numAnims; i++){
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i); CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
CBaseModelInfo *model = GetModelFromName(anim->name); CBaseModelInfo *model = GetModelFromName(anim->name);
assert(model);
printf("Associated anim %s with model %s\n", anim->name, model->GetName()); printf("Associated anim %s with model %s\n", anim->name, model->GetName());
if(model){ RpClump *clump = (RpClump*)model->CreateInstance();
RpClump *clump = (RpClump*)model->CreateInstance(); RpAnimBlendClumpInit(clump);
RpAnimBlendClumpInit(clump); assocList[i].Init(clump, anim);
assocList[i].Init(clump, anim); RpClumpDestroy(clump);
RpClumpDestroy(clump); assocList[i].animId = i;
assocList[i].animId = i;
}
} }
numAssociations = animBlock->numAnims; numAssociations = animBlock->numAnims;
} }

View file

@ -1357,6 +1357,7 @@ CCollision::DistToLine(const CVector *l0, const CVector *l1, const CVector *poin
void void
CCollision::CalculateTrianglePlanes(CColModel *model) CCollision::CalculateTrianglePlanes(CColModel *model)
{ {
assert(model);
if(model->numTriangles == 0) if(model->numTriangles == 0)
return; return;
@ -1367,7 +1368,6 @@ CCollision::CalculateTrianglePlanes(CColModel *model)
lptr->Remove(); lptr->Remove();
ms_colModelCache.head.Insert(lptr); ms_colModelCache.head.Insert(lptr);
}else{ }else{
assert(model);
lptr = ms_colModelCache.Insert(model); lptr = ms_colModelCache.Insert(model);
if(lptr == nil){ if(lptr == nil){
// make room if we have to, remove last in list // make room if we have to, remove last in list

View file

@ -361,10 +361,10 @@ CFileLoader::LoadClumpFile(const char *filename)
nodename = GetFrameNodeName(RpClumpGetFrame(clump)); nodename = GetFrameNodeName(RpClumpGetFrame(clump));
GetNameAndLOD(nodename, name, &n); GetNameAndLOD(nodename, name, &n);
mi = (CClumpModelInfo*)CModelInfo::GetModelInfo(name, nil); mi = (CClumpModelInfo*)CModelInfo::GetModelInfo(name, nil);
assert(mi->IsClump()); if(mi){
if(mi) assert(mi->IsClump());
mi->SetClump(clump); mi->SetClump(clump);
else }else
RpClumpDestroy(clump); RpClumpDestroy(clump);
} }
} }

View file

@ -1824,7 +1824,7 @@ char *CPad::EditString(char *pStr, int32 nSize)
} }
// numbers // numbers
for ( int32 i = 0; i < ('0' - '9' + 1); i++ ) for ( int32 i = 0; i < ('9' - '0' + 1); i++ )
{ {
if ( GetPad(0)->GetCharJustDown(i + '0') && pos < nSize - 1 ) if ( GetPad(0)->GetCharJustDown(i + '0') && pos < nSize - 1 )
{ {

View file

@ -240,7 +240,6 @@ public:
m_matrix.at.y = 0.0f; m_matrix.at.y = 0.0f;
m_matrix.at.z = 1.0f; m_matrix.at.z = 1.0f;
m_matrix.pos.x = 0.0f; m_matrix.pos.x = 0.0f;
m_matrix.pos.x = 0.0f;
m_matrix.pos.y = 0.0f; m_matrix.pos.y = 0.0f;
m_matrix.pos.z = 0.0f; m_matrix.pos.z = 0.0f;
} }

View file

@ -1919,7 +1919,7 @@ CPed::PlayFootSteps(void)
bool bool
CPed::IsPointerValid(void) CPed::IsPointerValid(void)
{ {
int8 pedIndex = CPools::GetPedPool()->GetIndex(this) >> 8; int pedIndex = CPools::GetPedPool()->GetIndex(this) >> 8;
if (pedIndex < 0 || pedIndex >= NUMPEDS) if (pedIndex < 0 || pedIndex >= NUMPEDS)
return false; return false;

View file

@ -173,9 +173,8 @@ CWaterLevel::CreateWavyAtomic()
{ {
wavyMorphTarget = RpGeometryGetMorphTarget(wavyGeometry, 0); wavyMorphTarget = RpGeometryGetMorphTarget(wavyGeometry, 0);
wavyVert = RpMorphTargetGetVertices(wavyMorphTarget);
ASSERT(wavyMorphTarget != NULL); ASSERT(wavyMorphTarget != NULL);
wavyVert = RpMorphTargetGetVertices(wavyMorphTarget);
ASSERT(wavyVert != NULL); ASSERT(wavyVert != NULL);
for ( int32 i = 0; i < 9; i++ ) for ( int32 i = 0; i < 9; i++ )
@ -1149,10 +1148,10 @@ CWaterLevel::AllocateBoatWakeArray()
ASSERT(ms_pWavyAtomic != NULL ); ASSERT(ms_pWavyAtomic != NULL );
RpGeometry *wavyGeometry = RpAtomicGetGeometry(ms_pWavyAtomic); RpGeometry *wavyGeometry = RpAtomicGetGeometry(ms_pWavyAtomic);
ASSERT(wavyGeometry != NULL );
RpMorphTarget *wavyMorphTarget = RpGeometryGetMorphTarget(wavyGeometry, 0); RpMorphTarget *wavyMorphTarget = RpGeometryGetMorphTarget(wavyGeometry, 0);
RpMaterial *wavyMaterial = RpGeometryGetMaterial(wavyGeometry, 0); RpMaterial *wavyMaterial = RpGeometryGetMaterial(wavyGeometry, 0);
ASSERT(wavyGeometry != NULL );
ASSERT(wavyMorphTarget != NULL ); ASSERT(wavyMorphTarget != NULL );
ASSERT(wavyMaterial != NULL ); ASSERT(wavyMaterial != NULL );

View file

@ -775,7 +775,7 @@ HandlePadButtonUp(RsPadButtonStatus *padButtonStatus)
bool bCam = false; bool bCam = false;
int16 mode = TheCamera.Cams[TheCamera.ActiveCam].Mode; int16 mode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
if ( mode == CCam::MODE_FLYBY || mode == CCam::MODE_FIXED ) if ( mode == CCam::MODE_FLYBY || mode == CCam::MODE_FIXED )
bool bCam = true; bCam = true;
ControlsManager.UpdateJoyButtonState(padNumber); ControlsManager.UpdateJoyButtonState(padNumber);

View file

@ -180,8 +180,6 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
bExplosionProof = true; bExplosionProof = true;
bBulletProof = true; bBulletProof = true;
} }
*(void**)this = (void*)0x600C1C;
} }
@ -1443,9 +1441,11 @@ CAutomobile::RcbanditCheckHitWheels(void)
{ EAXJMP(0x53C990); { EAXJMP(0x53C990);
} }
//WRAPPER void #if 0
//CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece) WRAPPER void
//{ EAXJMP(0x52F390); CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
{ EAXJMP(0x52F390); }
#else
void void
CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece) CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
{ {
@ -1494,7 +1494,7 @@ CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
return; return;
if(m_pDamageEntity){ if(m_pDamageEntity){
if(m_pDamageEntity->m_status == STATUS_PLAYER_PLAYBACKFROMBUFFER && if(m_pDamageEntity->IsBuilding() &&
DotProduct(m_vecDamageNormal, GetUp()) > 0.6f) DotProduct(m_vecDamageNormal, GetUp()) > 0.6f)
return; return;
} }
@ -1686,6 +1686,7 @@ CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
} }
} }
} }
#endif
void void
CAutomobile::dmgDrawCarCollidingParticles(const CVector &pos, float amount) CAutomobile::dmgDrawCarCollidingParticles(const CVector &pos, float amount)

View file

@ -70,7 +70,7 @@ char VehicleNames[NUMHANDLINGS][14] = {
cHandlingDataMgr::cHandlingDataMgr(void) cHandlingDataMgr::cHandlingDataMgr(void)
{ {
memset(this, 0, sizeof(this)); memset(this, 0, sizeof(*this));
} }
void void