Merge pull request #396 from Nick007J/master

script fix
This commit is contained in:
Nikolay Korolev 2020-04-10 12:04:17 +03:00 committed by GitHub
commit 6b9aadc021
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11373,15 +11373,15 @@ void CTheScripts::ClearSpaceForMissionEntity(const CVector& pos, CEntity* pEntit
continue; continue;
CEntity* pFound = aEntities[i]; CEntity* pFound = aEntities[i];
int cols; int cols;
if (CModelInfo::GetModelInfo(pEntity->GetModelIndex())->GetColModel()->numLines <= 0) if (pEntity->GetColModel()->numLines <= 0)
cols = CCollision::ProcessColModels(pEntity->GetMatrix(), *CModelInfo::GetModelInfo(pEntity->GetModelIndex())->GetColModel(), cols = CCollision::ProcessColModels(pEntity->GetMatrix(), *pEntity->GetColModel(),
pFound->GetMatrix(), *CModelInfo::GetModelInfo(pFound->GetModelIndex())->GetColModel(), aTempColPoints, nil, nil); pFound->GetMatrix(), *pFound->GetColModel(), aTempColPoints, nil, nil);
else { else {
float lines[4]; float lines[4];
lines[0] = lines[1] = lines[2] = lines[3] = 1.0f; lines[0] = lines[1] = lines[2] = lines[3] = 1.0f;
CColPoint tmp; CColPoint tmp[4];
cols = CCollision::ProcessColModels(pEntity->GetMatrix(), *CModelInfo::GetModelInfo(pEntity->GetModelIndex())->GetColModel(), cols = CCollision::ProcessColModels(pEntity->GetMatrix(), *pEntity->GetColModel(),
pFound->GetMatrix(), *CModelInfo::GetModelInfo(pFound->GetModelIndex())->GetColModel(), aTempColPoints, &tmp, lines); pFound->GetMatrix(), *pFound->GetColModel(), aTempColPoints,tmp, lines);
} }
if (cols <= 0) if (cols <= 0)
continue; continue;