Commit graph

8 commits

Author SHA1 Message Date
Adngel
1ba34ae83a
Fix: Ceiling and Floor trapdoors (#972)
Although the trapdoor code were correct, looks like that at some moment, someone merged all the trapdoors to initialize them together with the same values.

But Ceiling and Floor Trapdoors must use different Collision functions. So this fix separate those objects from the normal trapdoors and put their right collision functions.
2023-01-27 23:00:56 +00: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
Nemoel-Tomo
e225ddec87 changed darts to draw real mesh 2022-12-19 18:43:07 +01:00
Anatoly
823684a1d0
Setup parameters cleanup (#860)
* Remove unused setup parameters
* Remove more unused parameters
2022-11-22 12:28:24 +02:00
Sezz
b8fd52554d Vertical pole fix (#707)
* Partially revise vertical pole detection
* Refine vertical pole mount logic
* Cleanup
* Cleanup
* Partially fix grabbing vertical poles while airborne
* Dump a maths function from another branch
* Use const argument
* Fix wrong sphere collisions with vertical poles in edge cases
* Cleanup
* Update vector struct methods
* Fix Lara alignment on narrow distances
* Revert removal of static keyword; update IsPointInFront()

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2022-08-30 16:59:19 +03:00
Lwmte
f768fd03bd Use separate shadow modes for different kinds of objects 2022-07-17 18:43:40 +03:00
Raildex
84f93608bb Cubemap shadow (#558)
* Cubemap shadow WIP
* Fade out Point Light Shadow
* Fixed SpotLight Direction and Angle

Added Fadeout at the edges of Spot Light Cone

* Using Light.Out for Spot Light Projection Matrix
* Added Experimental Blob Shadows
* Fixed Crash with too many blob shadows.

Now using the 16 nearest spheres

* Remove long unused UNIT_SHADOW
* Fix merge
* Check cast shadows flag for dynamic shadows generation
* Make shadow spheres count customizable, add "shadows: all" setting
* Fix headers
* Fix copypaste error
* Fix shader compiling
* Format code, make subfunction for blobs rendering

Co-authored-by: Raildex <n@a>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2022-06-29 17:54:48 +03:00
MontyTRC89
f1e7c6fbfc All files under the same project; Renamed TR5Main to TombEngine; Cleaned repository; 2022-05-08 06:52:04 +02:00
Renamed from TR5Main/Objects/Generic/generic_objects.cpp (Browse further)