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
63ffb77bd6
3 changed files with 9 additions and 11 deletions
|
@ -122,7 +122,7 @@
|
||||||
<td class="summary">Ammo used.</td>
|
<td class="summary">Ammo used.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" ><a href="#traveledDistance">traveledDistance</a></td>
|
<td class="name" ><a href="#distanceTraveled">distanceTraveled</a></td>
|
||||||
<td class="summary">Distance traveled.</td>
|
<td class="summary">Distance traveled.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -197,8 +197,8 @@
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a name = "traveledDistance"></a>
|
<a name = "distanceTraveled"></a>
|
||||||
<strong>traveledDistance</strong>
|
<strong>distanceTraveled</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Distance traveled.
|
Distance traveled.
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">traveledDistance</span>
|
<li><span class="parameter">distanceTraveled</span>
|
||||||
<span class="types"><span class="type">int</span></span>
|
<span class="types"><span class="type">int</span></span>
|
||||||
amount of traveled distance in world units. One meter is 420 world units.
|
amount of traveled distance in world units. One meter is 420 world units.
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -330,6 +330,8 @@ void TestForObjectOnLedge(ItemInfo* item, CollisionInfo* coll)
|
||||||
|
|
||||||
bool TestLaraPosition(const ObjectCollisionBounds& bounds, ItemInfo* item, ItemInfo* laraItem)
|
bool TestLaraPosition(const ObjectCollisionBounds& bounds, ItemInfo* item, ItemInfo* laraItem)
|
||||||
{
|
{
|
||||||
|
DrawDebugBox(bounds.BoundingBox.ToBoundingOrientedBox(item->Pose), Color(1.0f, 0.0f, 0.0f), RendererDebugPage::CollisionStats);
|
||||||
|
|
||||||
auto deltaOrient = laraItem->Pose.Orientation - item->Pose.Orientation;
|
auto deltaOrient = laraItem->Pose.Orientation - item->Pose.Orientation;
|
||||||
if (deltaOrient.x < bounds.OrientConstraint.first.x || deltaOrient.x > bounds.OrientConstraint.second.x ||
|
if (deltaOrient.x < bounds.OrientConstraint.first.x || deltaOrient.x > bounds.OrientConstraint.second.x ||
|
||||||
deltaOrient.y < bounds.OrientConstraint.first.y || deltaOrient.y > bounds.OrientConstraint.second.y ||
|
deltaOrient.y < bounds.OrientConstraint.first.y || deltaOrient.y > bounds.OrientConstraint.second.y ||
|
||||||
|
@ -341,11 +343,7 @@ bool TestLaraPosition(const ObjectCollisionBounds& bounds, ItemInfo* item, ItemI
|
||||||
auto pos = (laraItem->Pose.Position - item->Pose.Position).ToVector3();
|
auto pos = (laraItem->Pose.Position - item->Pose.Position).ToVector3();
|
||||||
auto rotMatrix = item->Pose.Orientation.ToRotationMatrix();
|
auto rotMatrix = item->Pose.Orientation.ToRotationMatrix();
|
||||||
|
|
||||||
// This solves once for all the minus sign hack of CreateFromYawPitchRoll.
|
// NOTE: Transpose = faster inverse.
|
||||||
// In reality it should be the inverse, but the inverse of a rotation matrix is equal to the transpose
|
|
||||||
// and transposing a matrix is faster.
|
|
||||||
// It's the only piece of code that does it, because we want Lara's location relative to the identity frame
|
|
||||||
// of the object we are test against.
|
|
||||||
rotMatrix = rotMatrix.Transpose();
|
rotMatrix = rotMatrix.Transpose();
|
||||||
|
|
||||||
pos = Vector3::Transform(pos, rotMatrix);
|
pos = Vector3::Transform(pos, rotMatrix);
|
||||||
|
|
|
@ -31,9 +31,9 @@ namespace TEN::Scripting
|
||||||
"ammoUsed", &Statistics::AmmoUsed,
|
"ammoUsed", &Statistics::AmmoUsed,
|
||||||
|
|
||||||
/*** Distance traveled.
|
/*** Distance traveled.
|
||||||
@tfield int traveledDistance amount of traveled distance in world units. One meter is 420 world units.
|
@tfield int distanceTraveled amount of traveled distance in world units. One meter is 420 world units.
|
||||||
*/
|
*/
|
||||||
"traveledDistance", &Statistics::Distance,
|
"distanceTraveled", &Statistics::Distance,
|
||||||
|
|
||||||
/*** Health packs used.
|
/*** Health packs used.
|
||||||
@tfield int healthPacksUsed amount of used medipacks.
|
@tfield int healthPacksUsed amount of used medipacks.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue