mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Rename CamOldPos and use more consistent type for it
This commit is contained in:
parent
1748eef34a
commit
7a3aea07fa
1 changed files with 4 additions and 6 deletions
|
@ -51,6 +51,7 @@ struct OLD_CAMERA
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ItemCameraOn;
|
bool ItemCameraOn;
|
||||||
|
GameVector LastPosition;
|
||||||
GameVector LastTarget;
|
GameVector LastTarget;
|
||||||
GameVector LastIdeal;
|
GameVector LastIdeal;
|
||||||
GameVector Ideals[5];
|
GameVector Ideals[5];
|
||||||
|
@ -59,7 +60,6 @@ int CameraSnaps = 0;
|
||||||
int TargetSnaps = 0;
|
int TargetSnaps = 0;
|
||||||
GameVector LookCamPosition;
|
GameVector LookCamPosition;
|
||||||
GameVector LookCamTarget;
|
GameVector LookCamTarget;
|
||||||
Vector3i CamOldPos;
|
|
||||||
CAMERA_INFO Camera;
|
CAMERA_INFO Camera;
|
||||||
GameVector ForcedFixedCamera;
|
GameVector ForcedFixedCamera;
|
||||||
int UseForcedFixedCamera;
|
int UseForcedFixedCamera;
|
||||||
|
@ -1052,7 +1052,7 @@ void CalculateCamera(const CollisionInfo& coll)
|
||||||
|
|
||||||
if (!HandlePlayerOptics(*LaraItem))
|
if (!HandlePlayerOptics(*LaraItem))
|
||||||
{
|
{
|
||||||
Camera.pos = CamOldPos;
|
Camera.pos = LastPosition;
|
||||||
Camera.target = LastTarget;
|
Camera.target = LastTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1063,9 +1063,7 @@ void CalculateCamera(const CollisionInfo& coll)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CamOldPos.x = Camera.pos.x;
|
LastPosition = Camera.pos;
|
||||||
CamOldPos.y = Camera.pos.y;
|
|
||||||
CamOldPos.z = Camera.pos.z;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UseForcedFixedCamera != 0)
|
if (UseForcedFixedCamera != 0)
|
||||||
|
@ -1358,7 +1356,7 @@ void ItemPushCamera(GameBoundingBox* bounds, Pose* pos, short radius)
|
||||||
|
|
||||||
auto pointColl = GetPointCollision(Camera.pos.ToVector3i(), Camera.pos.RoomNumber);
|
auto pointColl = GetPointCollision(Camera.pos.ToVector3i(), Camera.pos.RoomNumber);
|
||||||
if (pointColl.GetFloorHeight() == NO_HEIGHT || Camera.pos.y > pointColl.GetFloorHeight() || Camera.pos.y < pointColl.GetCeilingHeight())
|
if (pointColl.GetFloorHeight() == NO_HEIGHT || Camera.pos.y > pointColl.GetFloorHeight() || Camera.pos.y < pointColl.GetCeilingHeight())
|
||||||
Camera.pos = GameVector(CamOldPos, pointColl.GetRoomNumber());
|
Camera.pos = GameVector(LastPosition.ToVector3i(), pointColl.GetRoomNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckItemCollideCamera(ItemInfo* item)
|
bool CheckItemCollideCamera(ItemInfo* item)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue