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
839f05b3d1
5 changed files with 14 additions and 15 deletions
|
@ -35,6 +35,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
||||||
* Fixed exploding TR3 bosses.
|
* Fixed exploding TR3 bosses.
|
||||||
* Fixed original issue with deactivation of Dart Emitter.
|
* Fixed original issue with deactivation of Dart Emitter.
|
||||||
* Fixed original issue with weapon hotkeys available in binoculars or lasersight mode.
|
* Fixed original issue with weapon hotkeys available in binoculars or lasersight mode.
|
||||||
|
* Fixed Electricity Wires object not doing instant kill when Lara is in close proximity.
|
||||||
* Fixed Lens Flare object not functioning properly.
|
* Fixed Lens Flare object not functioning properly.
|
||||||
* Fixed lens flares not being occluded by static meshes and moveables.
|
* Fixed lens flares not being occluded by static meshes and moveables.
|
||||||
* Fixed spotlight shadows.
|
* Fixed spotlight shadows.
|
||||||
|
|
|
@ -222,7 +222,7 @@ void ElectricityWiresControl(short itemNumber)
|
||||||
isWaterNearby = true;
|
isWaterNearby = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool instantKill = BoundingSphere(Vector3(pos.x, pos.y, pos.z), CLICK(0.25f)).Intersects(npcBox);
|
bool instantKill = BoundingSphere(Vector3(pos.x, pos.y, pos.z), BLOCK(0.25f)).Intersects(npcBox);
|
||||||
|
|
||||||
if (isWaterNearby || instantKill)
|
if (isWaterNearby || instantKill)
|
||||||
{
|
{
|
||||||
|
|
|
@ -140,7 +140,6 @@ void InitPickup(ObjectInfo* object, int objectNumber, std::function<ControlFunct
|
||||||
if (object->loaded)
|
if (object->loaded)
|
||||||
{
|
{
|
||||||
object->Initialize = InitializePickup;
|
object->Initialize = InitializePickup;
|
||||||
|
|
||||||
object->collision = PickupCollision;
|
object->collision = PickupCollision;
|
||||||
object->control = (func != nullptr) ? func : PickupControl;
|
object->control = (func != nullptr) ? func : PickupControl;
|
||||||
object->isPickup = true;
|
object->isPickup = true;
|
||||||
|
@ -156,7 +155,6 @@ void InitFlare(ObjectInfo* object, int objectNumber)
|
||||||
object->collision = PickupCollision;
|
object->collision = PickupCollision;
|
||||||
object->control = FlareControl;
|
object->control = FlareControl;
|
||||||
object->pivotLength = 256;
|
object->pivotLength = 256;
|
||||||
object->HitPoints = 256; // Time.
|
|
||||||
object->usingDrawAnimatingItem = false;
|
object->usingDrawAnimatingItem = false;
|
||||||
object->isPickup = true;
|
object->isPickup = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace TEN::Scripting
|
||||||
// @treturn Time A new Time object initialized with the given frame count.
|
// @treturn Time A new Time object initialized with the given frame count.
|
||||||
Time::Time(int gameFrames)
|
Time::Time(int gameFrames)
|
||||||
{
|
{
|
||||||
_frameCount = gameFrames;
|
_frameCount = std::clamp(gameFrames, 0, INT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a Time object from a formatted string.
|
/// Create a Time object from a formatted string.
|
||||||
|
@ -194,18 +194,18 @@ namespace TEN::Scripting
|
||||||
|
|
||||||
Time& Time::operator -=(const Time& time)
|
Time& Time::operator -=(const Time& time)
|
||||||
{
|
{
|
||||||
_frameCount -= time._frameCount;
|
_frameCount = std::clamp(_frameCount - time._frameCount, 0, INT_MAX);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Time Time::operator +(int frameCount) const
|
Time Time::operator +(int frameCount) const
|
||||||
{
|
{
|
||||||
return Time(frameCount + _frameCount);
|
return Time(_frameCount + frameCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
Time Time::operator -(int frameCount) const
|
Time Time::operator -(int frameCount) const
|
||||||
{
|
{
|
||||||
return Time(frameCount - _frameCount);
|
return Time(std::clamp(_frameCount - frameCount, 0, INT_MAX));
|
||||||
}
|
}
|
||||||
|
|
||||||
Time Time::operator +(const Time& time) const
|
Time Time::operator +(const Time& time) const
|
||||||
|
@ -215,17 +215,17 @@ namespace TEN::Scripting
|
||||||
|
|
||||||
Time Time::operator -(const Time& time) const
|
Time Time::operator -(const Time& time) const
|
||||||
{
|
{
|
||||||
return Time(_frameCount - time._frameCount);
|
return Time(std::clamp(_frameCount - time._frameCount, 0, INT_MAX));
|
||||||
}
|
}
|
||||||
|
|
||||||
Time Time::operator <(const Time& time) const
|
bool Time::operator <(const Time& time) const
|
||||||
{
|
{
|
||||||
return Time(_frameCount < time._frameCount);
|
return _frameCount < time._frameCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
Time Time::operator <=(const Time& time) const
|
bool Time::operator <=(const Time& time) const
|
||||||
{
|
{
|
||||||
return Time(_frameCount <= time._frameCount);
|
return _frameCount <= time._frameCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Time::operator ==(const Time& time) const
|
bool Time::operator ==(const Time& time) const
|
||||||
|
|
|
@ -42,13 +42,13 @@ namespace TEN::Scripting
|
||||||
|
|
||||||
// Operators
|
// Operators
|
||||||
|
|
||||||
|
bool operator <(const Time& time) const;
|
||||||
|
bool operator <=(const Time& time) const;
|
||||||
|
bool operator ==(const Time& time) const;
|
||||||
Time operator +(int frameCount) const;
|
Time operator +(int frameCount) const;
|
||||||
Time operator -(int frameCount) const;
|
Time operator -(int frameCount) const;
|
||||||
Time operator +(const Time& time) const;
|
Time operator +(const Time& time) const;
|
||||||
Time operator -(const Time& time) const;
|
Time operator -(const Time& time) const;
|
||||||
Time operator <(const Time& time) const;
|
|
||||||
Time operator <=(const Time& time) const;
|
|
||||||
bool operator ==(const Time& time) const;
|
|
||||||
Time& operator +=(const Time& time);
|
Time& operator +=(const Time& time);
|
||||||
Time& operator -=(const Time& time);
|
Time& operator -=(const Time& time);
|
||||||
Time& Time::operator ++();
|
Time& Time::operator ++();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue