Commit graph

9399 commits

Author SHA1 Message Date
Lwmte
dbf69de04f Implement GetCameraRoom instead of GetCameraUnderwater 2023-12-18 01:58:05 +01:00
Lwmte
15b4ad2b46 Add GetCameraUnderwater() to lua API 2023-12-18 01:08:28 +01:00
Lwmte
87da98178c Fix #1280 2023-12-17 11:27:05 +01:00
Lwmte
921dcb905a Update Changes.txt 2023-12-16 12:36:02 +01:00
Lwmte
969a0f0bed Revert "Update Changes.txt"
This reverts commit a0f2cd973a.
2023-12-16 12:34:22 +01:00
Sezz
a0f2cd973a Update Changes.txt 2023-12-14 18:16:30 +11:00
Sezz
718bc86c4d Fix jittery camera when performing crawl-to-hang 2023-12-14 14:56:45 +11:00
Sezz
59104e388b Fix crawl weapon bug; fix sprint jump bug 2023-12-14 14:27:57 +11:00
Lwmte
99a04a6718 Merge branch 'event_set_editor_enhancements' into develop 2023-12-11 08:20:01 +01:00
Lwmte
0c444e6434 Rename GameStatus enum to better reflect the meaning 2023-12-10 21:52:05 +01:00
Lwmte
bd4d3cc58d Really provide player item index to a HandleEvent function without activator specified 2023-12-10 21:41:15 +01:00
Sezz
e78e21b8d9
Soft intelligent object collision (#1270)
* Update collide_item.cpp

* Add Lerp() methods to Vector3i(); simplify

* Calculate accurate box for creature collision

* Avoid creature collision interfering with player object interactions

* Add comment

* Fix errors

* Use clearer names
2023-12-10 11:18:38 +00:00
Jakub
8ad6966c3b
Update Changes.txt 2023-12-10 10:46:02 +00:00
Sezz
0e3533023e
Implement speedometer (#1276)
* Implement speedometer

* Prepare HandleVehicleSpeedometer()

* Update position and scale

* Show speedometer when on certain vehicles

* Change values

---------

Co-authored-by: Kubsy <kubadd475@gmail.com>
2023-12-10 10:39:13 +00:00
Sezz
c1f78e8855 Update PlayerContext.cpp 2023-12-09 21:59:26 +11:00
Sezz
2aa78da89a Maybe fix rare edge case stutter when landing on edges 2023-12-09 21:58:26 +11:00
Sezz
397ffd56f8 Add GetEffectiveGravity() function 2023-12-09 21:10:07 +11:00
Sezz
3c17ffe3c3 Make 2 room functions static 2023-12-09 18:31:04 +11:00
Sezz
c4cb594fc2 Reserve tread water vault states 2023-12-08 21:45:16 +11:00
Sezz
626b6c587b Remove _cdecl thing 2023-12-08 01:43:21 +11:00
Sezz
3e0dc4d021 Merge branch 'develop' of https://github.com/MontyTRC89/TombEngine into develop 2023-12-04 21:49:40 +11:00
Sezz
6ae964b731 Formatting 2023-12-04 21:49:10 +11:00
Jakub
fb74011e69
Update Changes.txt 2023-12-04 10:48:31 +00:00
Nemoel-Tomo
528b92c0d3
keyholes: keep or loose key from inventory with ocb (#1275)
* keyholes keep or loose key from inventory with ocb

* OCB 0 will remove key from inventrory
2023-12-04 09:33:44 +00:00
Lwmte
432d9eb7c7 Fix enums 2023-12-03 11:55:12 +01:00
Lwmte
2c8dd72f6f Fix copypaste bug 2023-12-03 11:51:43 +01:00
Lwmte
ad7b05ddda Merge branch 'develop' into event_set_editor_enhancements 2023-12-03 11:46:33 +01:00
Sezz
101ac9f76a Fix GetStaticObjectLos() 2023-12-03 21:21:41 +11:00
Adngel
4ca16b887c Uncommented Enemies Damage underwater 2023-12-03 10:16:46 +01:00
Lwmte
c5aa4c7fac Update Changes.txt 2023-12-03 07:51:41 +01:00
Lwmte
637218d74d Update Changes.txt 2023-12-03 07:51:03 +01:00
Lwmte
cf7ed097c2 Update Changes.txt 2023-12-03 07:50:34 +01:00
Lwmte
202380d696 Update Changes.txt 2023-12-03 07:49:48 +01:00
Lwmte
cc147e4a92 Merge branch 'develop' into event_set_editor_enhancements 2023-12-03 07:42:44 +01:00
Lwmte
710022ca4e Safeguard for cases when unknown event type is found in level 2023-12-03 07:42:26 +01:00
Jakub
762889ed02
Update Changes.txt 2023-12-02 10:49:14 +00:00
Sezz
81e09e77a6 Add geometry functions for point intersection tests 2023-12-02 21:13:31 +11:00
Adngel
820f4bef5b
Lua moveables functions (#1245)
* Added SetStatus

* Added GetInteractedObj

* Update LaraObject.cpp

* Formatting

* Register new enum

* Function name change: GetInteractedMoveable

* Name reverted to GetPlayerInteractedMoveable

* Update LaraObject.h

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2023-12-02 09:41:31 +00:00
Adngel
09e4f02e66
Adngel varied fixes (#1256)
* Lara 6 click landing

Changed the freefall threshold value from 131 to 126.

In that way, Lara will pass to freefall animation a bit sooner what will activate the strong landing from the 6 clicks heights.

* Fix: Swamp camera shaking

I explored the code a bit, but fixing one thing ended breaking another, and all that with a camera refactor in the roadmap.

So I the end I decided keep it simple with a hack to avoid the solve the current. Once the code keep improving, surelly this will can be handled better.

* Fix tabs

* Update lara.h

* Fix comment and math

* Fix value

* Update flame_emitters.cpp

- Fixed the small flame alpha transition when used intermittent jet flame.
- Removed unused code
- Added references variables to replace the ItemFlags names, to enhace readibility.

* LARA_FREEFALL_VELOCITY restored

Caused the strong landing when Lara is doing a jump from 4 clicks to the ground. This was not a desired behaviour, so the value has been reverted.

* Fix: Pushables waterHeight in swamp rooms.

* Update Flame Emitter 1 code

Restored the alpha shifts to recover missing behaviour.

* Fix: Grabbing and throwing Torch from crouch state.

* Lara flare pose, excluded animations list

Lara now won't do the flare pose if the animation is in the exclussion list. (Usually animations where the logic is that Lara also use the left hand, like several switches).

* Drop torch if is swimming in water.

* Update lara_fire.cpp

* Fix formatting

* Update flame_emitters.cpp

* Update burning_torch.cpp

- Changed flame sprites
- Changed GetRandomControl by Random:: functions

* Fix pushables bug when dropped to 1 click pit

* Update burning_torch.cpp

- Changed flame spawn position
- Removed randomness of initial rotation to perform better with fire sprites.

* Fix Pushable initialized underwater

- Underwater pushables won't spawn ripples if the waterheight is bigger than the actual pushable height.
- Added a missing state transtion.

* Update lara_fire.cpp

That break was making that the flare routines don't activate during the exception animations.

(In this animations, the flare pose in the left hand shall not activate, that's why the ControlLeft is set to false, but other effects like Light and Sparks are still needed, so it can't exit the cycle with break here yet.

* Fix Swamp Rooms camera

The previous hack, worked in the quick sand room I had. But then I tested different level with differnt swamp pool and a different error arised. That took me to keep researching.

Also when I fixed a bug in the pushables related to the swamps, I learned also a couple of more things.

So this version return to the original line, but changes the g_Level.Rooms[probe.RoomNumber].y for g_Level.Rooms[probe.RoomNumber].maxceiling

In that way, it ensures the camera goes over the swamp room, independently of the pool depth.

After this I didn't got shacking camera issue anymore on any of the two pools, and it neither sink the camera into the swamp pool (as happened before with the HACK in the deep swamp pools).

* Fix formatting

* Formatting

* Entity Sounds fix

- Now it will recalculate the entity room position according to the root of their transform, instead of using the item->RoomNumber that contains an offset of 2 clicks.

- Removed the camera room ENV_FLAGS requirements.

* Update animation.cpp

* Revert anim sound fix for now

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2023-12-02 09:39:33 +00:00
Sezz
d409db5f79 Use current conventions in jump and monkey swing states 2023-12-02 19:48:56 +11:00
Sezz
1ce333108a Remove obsolete test functions 2023-12-02 18:59:27 +11:00
Lwmte
6dca91e2b2 Possibly fix savegame issues 2023-12-02 01:26:51 +01:00
Lwmte
4ca4ed8178 Update level.cpp 2023-12-01 20:28:10 +01:00
Lwmte
455903e172 Extend script event enum, fix ldoc formatting for logic handler 2023-11-30 21:51:40 +01:00
MontyTRC89
1c076dd2f9 Fixed statics not rotating with LUA 2023-11-30 13:48:47 +01:00
Sezz
e418b84d6c Update Random.h 2023-11-30 17:17:25 +11:00
Lwmte
9fd737d1d8 Simplify event set search 2023-11-30 00:10:01 +01:00
Lwmte
8e7384f5f3 Add handling of global events 2023-11-29 19:53:25 +01:00
Sezz
afa22619e0 De-copypaste floodata function 2023-11-29 19:14:17 +11:00
Sezz
b63ef90d6c Accurately rotate display sprites around pivot 2023-11-29 00:34:32 +11:00