mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Merge branch 'develop' into develop_mirrors
This commit is contained in:
commit
f09b81fc87
7 changed files with 11 additions and 8 deletions
|
@ -16,6 +16,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
|||
* Fixed incorrect slide directions for sub-click geometry.
|
||||
* Fixed stutter during jumps between cameras in a flyby sequence.
|
||||
* Fixed uzi targeting issues after using flycheat.
|
||||
* Fixed hair object vertices not always linking properly.
|
||||
* Fixed snow particles not always melting on the ground.
|
||||
* Fixed enemies not damaging Lara if she is staying on the sector where enemies were triggered.
|
||||
* Fixed enemy pickups dropping on death sectors.
|
||||
|
|
|
@ -489,6 +489,7 @@ static void SetPlayerOptics(ItemInfo* item)
|
|||
player.Control.Look.IsUsingLasersight = true;
|
||||
player.Inventory.IsBusy = true;
|
||||
|
||||
Camera.DisableInterpolation = true;
|
||||
BinocularOldCamera = Camera.oldType;
|
||||
return;
|
||||
}
|
||||
|
@ -506,6 +507,7 @@ static void SetPlayerOptics(ItemInfo* item)
|
|||
player.Control.Look.IsUsingLasersight = false;
|
||||
player.Inventory.IsBusy = false;
|
||||
|
||||
Camera.DisableInterpolation = true;
|
||||
Camera.type = BinocularOldCamera;
|
||||
Camera.bounce = 0;
|
||||
AlterFOV(LastFOV);
|
||||
|
|
|
@ -958,6 +958,7 @@ void BinocularCamera(ItemInfo* item)
|
|||
player.Inventory.IsBusy = false;
|
||||
|
||||
Camera.type = BinocularOldCamera;
|
||||
Camera.DisableInterpolation = true;
|
||||
Camera.target = LastTarget;
|
||||
AlterFOV(LastFOV);
|
||||
return;
|
||||
|
|
|
@ -2175,6 +2175,7 @@ namespace TEN::Gui
|
|||
(player.Control.IsLow && !IsHeld(In::Crouch))) &&
|
||||
!UseSpotCam && !TrackCameraInit)
|
||||
{
|
||||
Camera.DisableInterpolation = true;
|
||||
player.Control.Look.OpticRange = ANGLE(0.7f);
|
||||
player.Control.Look.IsUsingBinoculars = true;
|
||||
player.Inventory.OldBusy = true;
|
||||
|
|
|
@ -436,7 +436,7 @@ namespace TEN::Renderer
|
|||
void CollectRooms(RenderView& renderView, bool onlyRooms);
|
||||
void CollectItems(short roomNumber, RenderView& renderView);
|
||||
void CollectStatics(short roomNumber, RenderView& renderView);
|
||||
void CollectLights(Vector3 position, float radius, int roomNumber, int prevRoomNumber, bool prioritizeShadowLight, bool useCachedRoomLights, std::vector<RendererLightNode>* roomsLights, std::vector<RendererLight*>* outputLights);
|
||||
void CollectLights(const Vector3& pos, float radius, int roomNumber, int prevRoomNumber, bool prioritizeShadowLight, bool useCachedRoomLights, std::vector<RendererLightNode>* roomsLights, std::vector<RendererLight*>* outputLights);
|
||||
void CollectLightsForItem(RendererItem* item);
|
||||
void CollectLightsForEffect(short roomNumber, RendererEffect* effect);
|
||||
void CollectLightsForRoom(short roomNumber, RenderView& renderView);
|
||||
|
|
|
@ -773,13 +773,11 @@ namespace TEN::Renderer
|
|||
int y2 = _moveablesVertices[parentBucket->StartVertex + v2].Position.y + parentBone->GlobalTranslation.y;
|
||||
int z2 = _moveablesVertices[parentBucket->StartVertex + v2].Position.z + parentBone->GlobalTranslation.z;
|
||||
|
||||
if (abs(x1 - x2) < 2 && abs(y1 - y2) < 2 && abs(z1 - z2) < 2)
|
||||
if (x1 == x2 && y1 == y2 && z1 == z2)
|
||||
{
|
||||
currentVertex->Bone = j;
|
||||
currentVertex->Position = parentVertex->Position;
|
||||
currentVertex->Normal = parentVertex->Normal;
|
||||
currentVertex->AnimationFrameOffset = parentVertex->AnimationFrameOffset;
|
||||
currentVertex->Tangent = parentVertex->Tangent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -854,7 +852,7 @@ namespace TEN::Renderer
|
|||
int y2 = _moveablesVertices[parentBucket->StartVertex + v2].Position.y + parentBone->GlobalTranslation.y;
|
||||
int z2 = _moveablesVertices[parentBucket->StartVertex + v2].Position.z + parentBone->GlobalTranslation.z;
|
||||
|
||||
if (abs(x1 - x2) < 2 && abs(y1 - y2) < 2 && abs(z1 - z2) < 2)
|
||||
if (x1 == x2 && y1 == y2 && z1 == z2)
|
||||
{
|
||||
currentVertex->Bone = j;
|
||||
currentVertex->Position = parentVertex->Position;
|
||||
|
|
|
@ -573,7 +573,7 @@ namespace TEN::Renderer
|
|||
}
|
||||
}
|
||||
|
||||
void Renderer::CollectLights(Vector3 position, float radius, int roomNumber, int prevRoomNumber, bool prioritizeShadowLight, bool useCachedRoomLights, std::vector<RendererLightNode>* roomsLights, std::vector<RendererLight*>* outputLights)
|
||||
void Renderer::CollectLights(const Vector3& pos, float radius, int roomNumber, int prevRoomNumber, bool prioritizeShadowLight, bool useCachedRoomLights, std::vector<RendererLightNode>* roomsLights, std::vector<RendererLight*>* outputLights)
|
||||
{
|
||||
if (_rooms.size() <= roomNumber)
|
||||
return;
|
||||
|
@ -618,7 +618,7 @@ namespace TEN::Renderer
|
|||
// Dynamic lights have the priority
|
||||
for (auto& light : _dynamicLights[_dynamicLightList])
|
||||
{
|
||||
float distSqr = Vector3::DistanceSquared(position, light.Position);
|
||||
float distSqr = Vector3::DistanceSquared(pos, light.Position);
|
||||
processLight(light, distSqr, 1);
|
||||
}
|
||||
|
||||
|
@ -649,7 +649,7 @@ namespace TEN::Renderer
|
|||
light.Type == LightType::Shadow ||
|
||||
light.Type == LightType::Spot)
|
||||
{
|
||||
float distSqr = Vector3::DistanceSquared(position, light.Position);
|
||||
float distSqr = Vector3::DistanceSquared(pos, light.Position);
|
||||
processLight(light, distSqr, 0);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue