* Fix: Impale animation
When I jump in the TR1 spikes, or when I'm over the emerging TR4 spikes, the value it gets is INTERSECT not CONTAINS
I think it is because the TR1 spikes are 2 clicks, it won't contain Lara's collider. And TR4 when they are emerging, also have smaller collider box, so it will neither CONTAINS Lara's collider until it get already very late (for then, Lara is already dead and doing another death animation).
Removing the condition, it will activate where is INTERSECTS or CONTAINS.
* Fix Rome Hammer damage.
It won't hurt Lara anymore while it's deactivated.
* Fix Traps Collision
Updated the code of 4blades (used by floor and ceiling versions).
Added a condition in the colliion check for non-itelligent objects (like traps) so collision will push Lara only for the traps that have ItemFlags[4] equal to 0.
TODO: Consider a different method.
* Update collide_item.cpp
I tried item->Collidable, but deactivating it, has more consecuencies, where spheres collisions are not detected so traps don't harm Lara, therefore I couldn't use it.
I returned it to coll->Setup.EnableObjectPush boolean, this variable is set in GenericSphereBoxCollision reading the ItemFlags[4] like it was before. (Most of the traps are builded around this) changing it could require a refactor of the traps that uses this feature.
* Fixes and Refactor of Joby Spikes
- Created references variables to replace ItemFlags, to make the code more readable.
- Replaced the deprecated GetRandomControl function from this code by Random::GenerateInt function.
- Fix bug with collider. This trap is using an internal collision detection routine to hurt Lara based in her position and the spike height, instead of the sphers. So it wasn't using the GenericSphereBoxCollision, I removed from its obj->collision to avoid it pushing Lara away.
- Fix bug about endless scale. Before it was increasing the spike far beyond the room bounds, now it will only increase 3 blocks and 1 click (3328, based in Troye's code). Leaving for a future enhace it for it to adapt at other room heights.
* Fix Mine bug
Now when Lara steps on a mine with OCB 1, the death animation will trigger correctly without crash the game.
* Increase damage Statue with Blade
from 20 to 200
So it's more likely it removes Lara more than 1/3 per hit.
* Fix and refactor of Sentry Gun
- Created references variables to replace ItemFlags, to make the code more readable.
- Added new ItemFlags [3] to contain the ID of the deactivator inventory item.
- Changed item pointer for item reference.
- Fix bug sentry gun rotation meshes: Looks like the the function "SetBoneRotationFlags" wasn't set properly.
* Changed namespace in 4blades code.
- Changed namespace name
From
namespace TEN::Entities::TR4
to
namespace TEN::Entities::Traps
- Fixed Damage variables names.
* Fix Rolling Spindle Moving through high steps.
Added extra condition to stop the movement of the rolling spindle blade.
In addition to walls, the spinning blade will stop if:
- Ceiling is lower than 4 clicks
- The floor ahead is lower or higher than 2.5 clicks. (To stop it moving up and down into pits, but still allow it to move through 1 and 2 click slopes).
- If there is a stopper flag (so they can be stopped with pushables).
* Update WreckingBall code
Still pending of refactor, but I think it's better manage that in a different branch.
* Update traps namespace
* Update TR4 traps
Disable trap push for Birdblade, Sethblade and Plough.
Deleted duplicated initialization of Plough and Chain in TR4 objects.
* Merge develop branch
There was a conflict with develop, this should fix it.
* Fix Dart Emitter Antitrigger
* Fix Homing Dart Emiter
When triggering, it was continously spawning darts, that was because the trigger code was resetting the item->Timer variable. This variable is aimed to be used to delay the activation or provoke a timed deactivation. Using the variable adittionaly for internal behaviour like the dart spawn frequency, may lead to uncertain results like this actual bug.
Using a separate variable (ItemFlags[1]) the dart spawn frequency timer won't be influenced by the triggers code.
* Formatting
* Update CHANGELOG.md
* Moved the routine from ControlCog to AnimatingControl
So now Animatings will can have the OCB 666 (used in Train level for the helicopter animating) and OCB 2 to make animating dissapear when Antitriggered. (Legacy features of TR4 code, maybe they got lost in the TR5 code).
* Fix SwingingBlade deactivation
It was happening that when the swinging blade got antitriggered, it was going to the stopping animation, but the object state remained activated, doing control calls on every loop. Now it will remove itself from the control loop calls.
---------
Co-authored-by: Sezz <sezzary@outlook.com>
Changing the commands order to switch off the Lara's hand flame in the same frame when she throws or drops the torch.
(The command must still be after the torch flare has been created, otherwise the torch flare will be switched off when instantiated).
Issue: https://github.com/MontyTRC89/TombEngine/issues/1376
Human LotType allows enemies to moves up and down of 2 and 4 clicks (like VCI guards) but Larson and Pierre hasn't got climbing animations, so they move over high steps just walking through.
That's why I'm changing them to obj->LotType = LotType::Basic; So they will do the correct path through 1 click steps.
When it detected a sector with no box (a tile marked with "set non-walkable sector" editor flag) the game was crashing.
Changing the detection order solved the issue.
This issue was not happening in previous version (it was originated at some point of the past month) so I'm not registering in the changes.txt