Commit graph

303 commits

Author SHA1 Message Date
Lwmte
f40c9895a1 Update Changes.txt 2023-01-22 11:06:16 +02:00
TokyoSU
502d40115a Update Changes.txt 2023-01-22 10:48:05 +01:00
Lwmte
0115d35864 Update Changes.txt 2023-01-14 03:32:48 +02:00
Lwmte
805d272228 Update Changes.txt 2023-01-13 19:17:42 +02:00
Adngel
c3746cd196
Fix Big Rat death crash (#952)
* Fix Big Rat death crash
* Function name changed
* Update Changes.txt
2023-01-13 14:40:36 +02:00
Lwmte
827b8d05f0 Fix #880 2023-01-13 02:28:03 +02:00
Lwmte
1bd485d5a5 Update Changes.txt 2023-01-13 01:43:42 +02:00
Adngel
8041a04db4
Lua new functions adngel (#934)
* Function: Update Floor Collision

Adds a new function to allow update the Floor collision of some objects (bridges, trapdoors, platforms, etc).

* Function: Play Camera

Allows to set activate a camera while this function is called.

Right now, it requires the position and room of the target. (WIP)

* Update

* Removed the duplicated comment for UpdateFloorCollision.
* Added new function GetIndex to the class Moveable.
* Added new function GetIndex to the class CameraObject.
* Added a new variable to the object LevelCameraInfo (Index).
* Edited the function PlayCamera

* Function: GetCameraType

* Update descriptions

Updated descriptions for.
* GetItemFlags(index)
* SetItemFlags (value, index)

* Bug fix on FixedCameras.

Bug description: When a fixed camera was being triggered, and, if the target go behind and obstacle, then the screen turned black.

Reason: In those conditions, the move camera check the origin vector received, however, that vector was incomplete because it had the room 0, so although Move camera corrected the room later, it was already using some wrong calculus at room 0 that caused the black camera (this got an offset that places it out of the real room).

The reason why the vector was getting room 0, was because the operator function = of the GameVector class, was forgetting to copy the Room Number.

After this fix, the bug is not observed anymore.

* Removal of Function UpdateFloorCollision

* Erasing of forgotten line

It was included for the UpdateBridgeFunction, but as that function is not here anymore, this include is not necessary.

* GetIndex functions hidden from public lua API

They still remain as they are being used by other classes, but they can't be called by lua script anymore.

* First attempht of new Enum for lua

Need to test first.

* Removal of GetIndex() in CameraObject

The GetIndex from the moveable class, is used in CameraObject class.

But this one from CameraObject, although I created it was still unused. So I'm unmaking it.

The Index var in the LevelCameraInfo.cpp is still there and is required for PlayCamera() function to work.

* Update GetCameraType() @usage example.

* Branch Update

- Extracted CameraType enumerator to its own header.
- Fixed formatting of CameraObject.cpp line 70

* Added comments for the doc

- Added comments to the enumerator for the doc.
- Removed datar from the function description, guiding to the enumerator CameraType info.

* Update Changes.txt

Added the content of this branch to the changes.txt

* Error correction in CameraTypes enumerator header.

* Updated usage example.

Updated for a shorter example.

* Update Changes.txt

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-01-13 00:10:47 +02:00
Lwmte
23ffafd396 Fix savegame crash for disabled enemies with partially set activation mask 2023-01-12 19:26:07 +02:00
Lwmte
cbd6f64be4 Fix backholster weapons not updating their sound position together with player 2023-01-11 23:56:16 +02:00
Lwmte
dd8358400d Update Changes.txt 2023-01-11 03:26:35 +02:00
Lwmte
16a8370ab6 Merge branch 'master' into Debugging_Adngel 2023-01-11 02:03:21 +02:00
Lwmte
dbd3eec2f4 Update Changes.txt 2023-01-11 02:02:15 +02:00
Lwmte
38e27858d3 Fix nonLot = true by default 2023-01-11 01:07:00 +02:00
hispidence
f400895b4b Regen docs. 2023-01-06 20:46:15 +00:00
hispidence
8cdf81f683 Add GetMeshSwapped to changes 2023-01-06 20:45:39 +00:00
hispidence
b9a7445d06 Merge branch 'master' into TriggerEnhancements 2023-01-06 20:27:17 +00:00
hispidence
bcd3b15f4d Add changes to change list 2023-01-06 20:26:18 +00:00
Lwmte
8669a38ac2 Fix invisible Lara after starting a new game from title flyby with hidden Lara 2023-01-04 16:07:29 +02:00
Lwmte
81914dea14 Add an option to activate lua or node events from legacy triggers, demagic masks 2023-01-03 15:37:12 +02:00
hispidence
2c2785747b Update Changes.txt and docs. 2023-01-02 19:31:01 +00:00
Kubsy
31e9c270eb Revert "Update Changes.txt"
This reverts commit e858cc9b7a.
2022-12-30 17:30:35 +00:00
Kubsy
e858cc9b7a Update Changes.txt 2022-12-30 17:29:22 +00:00
hispidence
283981b2a7 Docs regen 2022-12-30 16:33:26 +00:00
Lwmte
9e35c1ba1d Update Changes.txt 2022-12-29 23:01:52 +02:00
Lwmte
7f613d2785 Fix #909 2022-12-29 00:31:31 +02:00
Lwmte
59362a9dd8 Update Changes.txt 2022-12-28 12:23:17 +02:00
Lwmte
2a78253284 Update Changes.txt 2022-12-28 12:18:34 +02:00
TokyoSU
958f84e165
Zone type, pathfinding and some entity fix (#925)
* Started fixing zoneType

- Fixed ZoneType::Null being not usefull.
- Removed VonCroy zoneType.
- Fixed water and fly being inverted.

* Added more fixes.

- Fixed crocodile AI and Joint Angle, Also fixed attack distance.
- Fixed CIVVY not having the right zone.
- Fixed MP_WITH_STICK and CIVVY vault.
- Added some check for slot that required other slot.
- Fixed a rare crash if a smash item when in wall, also log it if something like that is found to warn the user.
- Fixed FLAMETHROWER_BADDY (TR3) attack range.
- Small rat (TR2) is now initialised with InitialiseCreature().
- Improved Big rat (TR1) water surface check.
- Fixed some entity bone rotation flags.

* Fixed WORKER_FLAMETHROWER

- Improved this code.
- Fixed attack range and walk aim loop when walking.

* Remove ClearItem()

- Replaced it by it's original owner which is InitialiseCreature()

* Added fix/add to the changelog

* Fixed yeti vault bug too.

* Removed fly lot for big_rat

- Already set when triggered

* Enable von_croy to go down 2 and 3 block

- Enable the animation for going down from 2 click and 3.
- Fixed pathfinding a bit.

* Fix BADDY down vault (3 block)

* Add misc code fix

* Update box.cpp

* Remove unused variable in box

* Reformat constants and enum element names; undo compressed reformatting; restore project tool settings

* Grammar

* Removed bat default swim speed

- Was in the wrong zone.

* Remove vcpkg label

* Removed not used variable for crocodile

- Avoid using same function twise (TestEnvironment).

* Fix constants

* Fix TR2 flamethrower state enum

* Fixed Platform Tool and MP_STICK 4 click vault.

* Updated objects init and guard

- Fixed double initialise of ID_SUBMARINE (ID_SUB_ATTACK)
- Fixed tr3 flamethrower state 3 being idle instead of run.
- Removed some variable being not used.
- Completed guard state and animation.
- Reworked guard vault code to ressemble other entities.
- Fixed guard sleeping anim being able to turn where it should not be !
- Added guard ocb enum.
- Fixed guard animation being change another time in this initialise function.
- Added lara roomNumber for guard LOS() target.
- Removed animIndex from guard control, it's already set when the object is loaded.
- Added the function CheckIfCreatureCanJumpOrRoll() in box.h/cpp

* Updated box.cpp

* Updated all entity and bone setup

- Fixed tr4 wild boar and dog rotation joint.
- Added SetupHitEffect() to set the hitEffect variable automatically, using intelligent, health, undead and also the new variable isSolid.
- Updated all entity zonetype and bone setup.
- Fixed guard alert range.

* Removed isSolid variable

- As an alternative, using void SetupHitEffect(bool isSolid = false, bool isAlive = false) instead.
- Now SetAnimation use: void SetAnimation(ItemInfo* item, int animIndex, int frameToStart = 0, int customTargetState = -1).

* Change return type of certain functions to bool; refine new functions; formatting

* Revert stuff, formatting

* Revert SetAnimation()

* Some fix

* Fixed loading zones for TEN

- Previous level loader not loaded the last zone which was fly, and voncroy zone was not deleted from the file format which broke the fly zone too.
- Now the level loader and the level format will take into account the ZoneType enum MaxZone count instead of a define (which was fixed to 6).
- Now the zone will be loaded based on number of boxes, instead of numBoxes * sizeof(int) which multiply it.

* Merge branch 'master' into ZoneTypeAndEntity_Fix

* Some minor change

* Some misc code added

- Added InitialiseCreature for some entities which don't have obj->initialise used

* Define defaults; organise

* Readded NO_BOX check

* Fixed guard AI (for jumping)

- Now the guard (and swat) will want to jump to reach lara instead of doing nothing (hunting)

* Correct animation number for Guard 2 Step Down

* Fix probabilities

* Fix SameZone typo, formatting

* Fixed last comment in PR

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2022-12-28 13:10:33 +02:00
Lwmte
76b80a92bf Fix crow/harpy death 2022-12-28 04:21:15 +02:00
Lwmte
fffddf625b Fix #911 2022-12-28 00:31:13 +02:00
Lwmte
fb59e53990 Update Changes.txt 2022-12-25 16:38:00 +02:00
Adngel
c1f549e59a Update Changes.txt (CogSwitch.cpp update)
Added inputs of the CogSwitch.cpp update.
2022-12-25 13:21:57 +01:00
Lwmte
9c72afc140 Merge branch 'master' into room_scripting 2022-12-24 01:10:56 +02:00
Lwmte
50c52500af Merge branch 'master' into TR3-tribeman-fix 2022-12-24 01:06:29 +02:00
Kubsy
26830c8a5e Update Changes.txt 2022-12-23 21:07:27 +00:00
Lwmte
6803c7324b Merge branch 'master' into fix-Tr5Cyborg-crash 2022-12-23 16:27:06 +02:00
Kubsy
458b151f30 Update changes.txt 2022-12-21 19:01:30 +00:00
Lwmte
93d8e309c9 Fix pathfinding problems for first initialized enemies of every slot 2022-12-20 01:49:39 +02:00
Lwmte
573ef9f500 Merge branch 'master' into room_scripting 2022-12-17 22:13:10 +02:00
Lwmte
8619444ea4 Fix flame emitter 3 2022-12-17 22:10:30 +02:00
Lwmte
07a5b0e501 Merge branch 'master' into room_scripting 2022-12-17 20:48:56 +02:00
Lwmte
fc0324acb3 Fix draw key incorrectly working in binoculars / lasersight mode 2022-12-17 20:48:04 +02:00
Lwmte
8423afee5e Merge branch 'master' into room_scripting 2022-12-17 19:40:13 +02:00
Lwmte
13302bca4c Add logging, restore ambient light from savegames 2022-12-17 19:39:19 +02:00
Lwmte
326bde4126 Update Changes.txt 2022-12-17 17:03:47 +02:00
Lwmte
8537caa68d Merge branch 'master' into room_scripting 2022-12-17 15:21:12 +02:00
Lwmte
4e10565855 Fix rollingball not killing Lara under certain angles 2022-12-17 14:24:44 +02:00
Lwmte
31a0c40e3e Update Changes.txt 2022-12-17 04:00:14 +02:00
hispidence
0f0d57cd66 Regenerate docs 2022-12-16 18:36:42 +00:00