MontyTRC89 / TombEngine

A new custom Tomb Raider engine based on TR5 engine
MIT License
67 stars 17 forks source link

[ bug Report ] Sophia-Leigh behaviour and issues #1470

Open Stranger1992 opened 1 week ago

Stranger1992 commented 1 week ago

TombEngine version

v1.5.0.2 (Latest Release)

Tomb Editor version

v1.7.2

Describe the bug

Sophia-Leigh is behaving odd and the setup for her isnt clear. #969

OCB Reference.

The comments in the code states:

Normal = 0,          // Move, climb, attack, and chase player.
Tower = 1,           // TR3 one, with climbing only.
TowerWithVolume = 2, // TR3 one, but uses volume to move instead of height check. Must increase/decrease creature->LocationAI to go up/down.

(https://github.com/MontyTRC89/TombEngine/blob/60f3c3d8c5bd1fe40337ff2c52be55b4bd905fab/TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp#L128)

General bugs

Can be blown apart by explosive weapons.

OCB 0 bugs

https://github.com/user-attachments/assets/347274d6-cd23-4f55-93a1-a611e1bc1b40

image

OCB 1 Bugs

Same as above. If player is nowhere near the last AI_X1 that Sophia can reach on her path: she will just back to another portion of the path she can take.

The code here does suggest that Sophia should check if player is above or below her and move accordingly but this does not happen

https://github.com/MontyTRC89/TombEngine/blob/60f3c3d8c5bd1fe40337ff2c52be55b4bd905fab/TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp#L290

OCB 2 Bugs:

The same bugs apply as OCB 1 but I also would like clarification on the intended setup that is meant to be used here. The brief detail is that Sophia's ascent is controlled via volumes in Tomb Editor. Which node exactly? There are none that seem applicable.

General comments

There are itemflags in the code but can the itemFlag for making Sophia fire where she is triggered be clarified (if it is not enabled?)

https://github.com/MontyTRC89/TombEngine/blob/60f3c3d8c5bd1fe40337ff2c52be55b4bd905fab/TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp#L701

Several instances of magic numbers used in the code:

https://github.com/MontyTRC89/TombEngine/blob/60f3c3d8c5bd1fe40337ff2c52be55b4bd905fab/TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp#L685C59-L685C61

https://github.com/MontyTRC89/TombEngine/blob/60f3c3d8c5bd1fe40337ff2c52be55b4bd905fab/TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp#L648

https://github.com/MontyTRC89/TombEngine/blob/60f3c3d8c5bd1fe40337ff2c52be55b4bd905fab/TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp#L649

https://github.com/MontyTRC89/TombEngine/blob/60f3c3d8c5bd1fe40337ff2c52be55b4bd905fab/TombEngine/Objects/TR3/Entity/SophiaLeigh.cpp#L473

Minimal reproduction project

Download here

Sophia has OCB 1.

If production files are needed then please comment and I will provide.

Stranger1992 commented 1 week ago

Exploding Sophia fixed by Lwmte : https://github.com/MontyTRC89/TombEngine/commit/87b9c3caacf188d21d2dbffd52c4afb4ab4db1ba