1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 16:50:07 +00:00

garage cam fix

This commit is contained in:
aap 2020-12-26 13:45:53 +01:00
parent c9c447e7a9
commit b41f93fcd6
2 changed files with 31 additions and 27 deletions

View file

@ -1137,11 +1137,14 @@ CCamera::CamControl(void)
}else{ }else{
whichDoor = 1; whichDoor = 1;
garageDoorPos1 = Cams[ActiveCam].Source; garageDoorPos1 = Cams[ActiveCam].Source;
garageCenter = CVector((stairsZone->minx+stairsZone->maxx)/2.0f, (stairsZone->miny+stairsZone->maxy)/2.0f, 0.0f);
if(stairsZone){ // always true
garageCenter = CVector((stairsZone->minx+stairsZone->maxx)/2, (stairsZone->miny+stairsZone->maxy)/2, 0.0f);
if(pTargetEntity->GetPosition().x > 376.0f && pTargetEntity->GetPosition().x < 383.0f && if(pTargetEntity->GetPosition().x > 376.0f && pTargetEntity->GetPosition().x < 383.0f &&
pTargetEntity->GetPosition().y > -496.0f && pTargetEntity->GetPosition().y < -489.0f && pTargetEntity->GetPosition().y > -496.0f && pTargetEntity->GetPosition().y < -489.0f &&
pTargetEntity->GetPosition().z > 11.6f && pTargetEntity->GetPosition().z < 13.6f){ pTargetEntity->GetPosition().z > 11.6f && pTargetEntity->GetPosition().z < 13.6f){
// if((garageCenter-garageDoorPos1).Magnitude() > 15.0f){ garageDoorPos1 = CVector(382.6f, -489.6f, 13.1f);
}else{
bool bClearViewOutside = true; bool bClearViewOutside = true;
CVector dirOutside = pTargetEntity->GetPosition() - garageCenter; CVector dirOutside = pTargetEntity->GetPosition() - garageCenter;
dirOutside.z = 0.0f; dirOutside.z = 0.0f;
@ -1160,6 +1163,7 @@ CCamera::CamControl(void)
garageDoorPos1 = posOutside; garageDoorPos1 = posOutside;
} }
} }
}
if(pToGarageWeAreIn){ if(pToGarageWeAreIn){
garageCenter.x = pToGarageWeAreIn->GetGarageCenterX(); garageCenter.x = pToGarageWeAreIn->GetGarageCenterX();
@ -1167,7 +1171,7 @@ CCamera::CamControl(void)
garageCenter.z = 0.0f; garageCenter.z = 0.0f;
}else{ }else{
garageDoorPos1.z = 0.0f; garageDoorPos1.z = 0.0f;
if(stairs == nil) // how can this be true? if(!stairs) // how can this be true?
garageCenter = CVector(pTargetEntity->GetPosition().x, pTargetEntity->GetPosition().y, 0.0f); garageCenter = CVector(pTargetEntity->GetPosition().x, pTargetEntity->GetPosition().y, 0.0f);
} }
if(whichDoor == 1) if(whichDoor == 1)

View file

@ -17,12 +17,12 @@ enum eZoneAttribs
struct CAttributeZone struct CAttributeZone
{ {
float minx; int16 minx;
float maxx; int16 maxx;
float miny; int16 miny;
float maxy; int16 maxy;
float minz; int16 minz;
float maxz; int16 maxz;
int16 attributes; int16 attributes;
int16 wantedLevel; int16 wantedLevel;
}; };