* 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>
* 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>