mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-26 05:05:40 +00:00
garage cam fix
This commit is contained in:
parent
c9c447e7a9
commit
b41f93fcd6
2 changed files with 31 additions and 27 deletions
|
@ -1137,11 +1137,14 @@ CCamera::CamControl(void)
|
|||
}else{
|
||||
whichDoor = 1;
|
||||
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 &&
|
||||
pTargetEntity->GetPosition().y > -496.0f && pTargetEntity->GetPosition().y < -489.0f &&
|
||||
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;
|
||||
CVector dirOutside = pTargetEntity->GetPosition() - garageCenter;
|
||||
dirOutside.z = 0.0f;
|
||||
|
@ -1160,6 +1163,7 @@ CCamera::CamControl(void)
|
|||
garageDoorPos1 = posOutside;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(pToGarageWeAreIn){
|
||||
garageCenter.x = pToGarageWeAreIn->GetGarageCenterX();
|
||||
|
@ -1167,7 +1171,7 @@ CCamera::CamControl(void)
|
|||
garageCenter.z = 0.0f;
|
||||
}else{
|
||||
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);
|
||||
}
|
||||
if(whichDoor == 1)
|
||||
|
|
|
@ -17,12 +17,12 @@ enum eZoneAttribs
|
|||
|
||||
struct CAttributeZone
|
||||
{
|
||||
float minx;
|
||||
float maxx;
|
||||
float miny;
|
||||
float maxy;
|
||||
float minz;
|
||||
float maxz;
|
||||
int16 minx;
|
||||
int16 maxx;
|
||||
int16 miny;
|
||||
int16 maxy;
|
||||
int16 minz;
|
||||
int16 maxz;
|
||||
int16 attributes;
|
||||
int16 wantedLevel;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue