Commit graph

8947 commits

Author SHA1 Message Date
Sezz
485e384286
Additionally play underwater sound effects in quicksand 2024-06-30 23:36:27 +10:00
Sezz
8aae53c2c2
New animation sound conditions (#1284)
* Base for new sound conditions

* Read flags

* Refine anim sound effect handling

* Add swamp check for DryLand anim sound effect

* Update local variable names

* Use proper math functions

* Update animation.cpp

* Address PR notes

* Syntax

---------

Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
2024-06-30 23:25:00 +10:00
Sezz
4c4a0b0510
Global access to debug objects (#1382)
* Make debug object drawing globally accessible and therefore convenient

* Fix case in debug includes

* Add math constants

* Add missing space

* Fix debug strings; reduce debug string scale

* Remove unused method

* Remove commented lines
2024-06-27 21:10:19 +10:00
Sezz
2be193a997 Use NO_VALUE in GetPlayerScrolledWeaponType() 2024-06-26 14:50:39 +10:00
Sezz
e39193497f Update sector class; disambiguate pathfinding boxes 2024-06-25 17:32:02 +10:00
Stranger1992
9f2cf860c5 Update CHANGELOG.md
Small changes to text to improve clarity
2024-06-24 22:14:30 +01:00
Sezz
399c039f21 Prevent more inappropriate tooltips 2024-06-25 01:24:32 +10:00
Sezz
ba6841bb18 Add tab 2024-06-21 13:37:06 +10:00
Sezz
c70bba367e Further organise math 2024-06-21 13:36:27 +10:00
Sezz
8a8e63b8e6 Formatting 2024-06-19 21:15:03 +10:00
Sezz
cb05e0eae8 Grammar 2024-06-19 21:07:26 +10:00
Jakub
2a6a96e03a
Implement KeyClearAll() Lua function (#1374)
* Implement KeyClearAll

* add entry to CHANGELOG.md
2024-06-19 11:20:57 +01:00
Adngel
7248091ca9
Adngel several traps fixes (#1379)
* 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>
2024-06-19 11:19:39 +01:00
Sezz
2e6db4e01c Add TEN::Debug namespace 2024-06-19 15:29:46 +10:00
Sezz
49b014bc88 Avoid inappropriate tooltips 2024-06-19 15:05:03 +10:00
Sezz
87b5e83901 Remove unnecessary framework define; add newlines between label comments to avoid inappropriate tooltips 2024-06-19 15:03:33 +10:00
Sezz
a34bfaa89b Fix project build paths again 2024-06-11 12:07:48 +10:00
Sezz
22176d05f5 Update CHANGELOG.md 2024-06-06 11:46:43 +10:00
Sezz
6fa494b093 Make monkey swing auto jump a player setting; Lua formatting 2024-06-06 11:42:54 +10:00
Sezz
d33d1ced19 Manually fix VS search and replace errors 2024-06-06 11:15:43 +10:00
Sezz
47e22abbe9 Remove Ptrs suffixes 2024-06-06 10:52:59 +10:00
Sezz
063e994213 Merge branch 'develop' into develop_60fps 2024-06-04 19:16:48 +10:00
Adngel
838dab484b Update CHANGELOG.md 2024-05-31 20:59:25 +02:00
Adngel
1f4404d760 Fix: Burning Torch, flame in hand
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
2024-05-31 20:52:57 +02:00
Adngel
01a4b69168 Fix: Larson and Pierre zone.
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.
2024-05-27 10:29:09 +02:00
MontyTRC89
903fbf62f8 Merge branch 'develop_60fps' of https://github.com/MontyTRC89/TombEngine into develop_60fps 2024-05-20 05:17:57 +02:00
MontyTRC89
dd46927f62 Fixed fish swarms not drawing 2024-05-20 05:17:31 +02:00
Jakub
40966147c9
Fix bullet points 2024-05-19 22:42:03 +01:00
Jakub
891a6d97fa Merge branch 'master' into develop
# Conflicts:
#	CHANGELOG.md
2024-05-19 22:37:52 +01:00
Jakub
192eb6c6f6
Add links to each version to releases page respectively 2024-05-19 22:34:58 +01:00
Jakub
c6dcc5d042 Merge branch 'master' into develop 2024-05-19 22:25:09 +01:00
Jakub
4727417b93
Update IMPORTANT_LINKS.md 2024-05-19 22:24:46 +01:00
Jakub
8f98b1c99d
add TEN logo 2024-05-19 22:22:20 +01:00
Jakub
c1817d9200
Update bug_report.yaml 2024-05-19 21:48:12 +01:00
Jakub
97a31f5bb1
change to lowercase letters 2024-05-19 21:47:31 +01:00
Sezz
be5c525fa2 Remove Ptr suffix 2024-05-19 18:21:01 +10:00
Sezz
210cad57e1 Fix formatting 2024-05-19 18:12:00 +10:00
Sezz
36133ea5e9 Use parentheses 2024-05-19 18:10:45 +10:00
Sezz
978fa30d61 Formatting 2024-05-19 18:09:41 +10:00
MontyTRC89
e50715bd31 Fixed bad interpolation of crosshair position 2024-05-19 05:34:53 +02:00
MontyTRC89
4fd6cceecd Added interpolation for scarabs, locusts, bats, rats, spiders, fishes 2024-05-18 05:40:27 +02:00
Sezz
0b749b0c95 Fix bridge push 2024-05-18 01:37:41 +10:00
MontyTRC89
be95d77d92 Merge branch 'develop_60fps' of https://github.com/MontyTRC89/TombEngine into develop_60fps 2024-05-17 13:39:10 +02:00
MontyTRC89
815598f425 Fixed fire emitters 2024-05-17 13:39:02 +02:00
Adngel
b9d3f81253 Fix: Electric Cleaner crash
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
2024-05-17 12:30:14 +02:00
Sezz
de91720fc9 Formatting 2024-05-17 19:40:09 +10:00
Sezz
206fd59e55 Interpolate speedometer 2024-05-17 18:57:22 +10:00
Sezz
411c397027 Minor formatting 2024-05-17 18:52:26 +10:00
MontyTRC89
a39f7ccd2c Disabled interpolation on PuzzleDone 2024-05-16 12:01:33 +02:00
MontyTRC89
6dd320f010 Merge branch 'develop_60fps' of https://github.com/MontyTRC89/TombEngine into develop_60fps 2024-05-16 11:50:19 +02:00