Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] What does WorldModel.cpp 41 do ?

[DiscordArchive] What does WorldModel.cpp 41 do ?

[DiscordArchive] What does WorldModel.cpp 41 do ?

rektbyfaith
Administrator
0
06-24-2024, 04:59 PM
#1
Archived author: jackpoz • Posted: 2024-06-24T16:59:50.073000+00:00
Original source

What does WorldModel.cpp 41 do ?
rektbyfaith
06-24-2024, 04:59 PM #1

Archived author: jackpoz • Posted: 2024-06-24T16:59:50.073000+00:00
Original source

What does WorldModel.cpp 41 do ?

rektbyfaith
Administrator
0
06-24-2024, 05:14 PM
#2
Archived author: stoneharry • Posted: 2024-06-24T17:14:12.424000+00:00
Original source

Yeah, conditional breakpoints on a live environment would be a brutal last resort. I would need to be available for next time it crashes, and I might not be there. Also it will hang the server for all players until I finish debugging. It's not easy to reproduce, it's pretty random but seems to consistently occur on the same map.

https://i.imgur.com/uBXuSjW.png
```c++
bool IntersectTriangle(MeshTriangle const& tri, std::vector<Vector3>::const_iterator points, G3D::Ray const& ray, float& distance)
{
static const float EPS = 1e-5f;

// See RTR2 ch. 13.7 for the algorithm.

const Vector3 e1 = points[tri.idx1] - points[tri.idx0];
const Vector3 e2 = points[tri.idx2] - points[tri.idx0]; // boom!
```https://imgur.com/uBXuSjW
rektbyfaith
06-24-2024, 05:14 PM #2

Archived author: stoneharry • Posted: 2024-06-24T17:14:12.424000+00:00
Original source

Yeah, conditional breakpoints on a live environment would be a brutal last resort. I would need to be available for next time it crashes, and I might not be there. Also it will hang the server for all players until I finish debugging. It's not easy to reproduce, it's pretty random but seems to consistently occur on the same map.

https://i.imgur.com/uBXuSjW.png
```c++
bool IntersectTriangle(MeshTriangle const& tri, std::vector<Vector3>::const_iterator points, G3D::Ray const& ray, float& distance)
{
static const float EPS = 1e-5f;

// See RTR2 ch. 13.7 for the algorithm.

const Vector3 e1 = points[tri.idx1] - points[tri.idx0];
const Vector3 e2 = points[tri.idx2] - points[tri.idx0]; // boom!
```https://imgur.com/uBXuSjW

rektbyfaith
Administrator
0
06-24-2024, 05:14 PM
#3
Archived author: jackpoz • Posted: 2024-06-24T17:14:55.106000+00:00
Original source

I thought it was on your dev machine, not prod
rektbyfaith
06-24-2024, 05:14 PM #3

Archived author: jackpoz • Posted: 2024-06-24T17:14:55.106000+00:00
Original source

I thought it was on your dev machine, not prod

rektbyfaith
Administrator
0
06-24-2024, 05:15 PM
#4
Archived author: stoneharry • Posted: 2024-06-24T17:15:10.259000+00:00
Original source

Yeah, unable to reproduce on dev.
rektbyfaith
06-24-2024, 05:15 PM #4

Archived author: stoneharry • Posted: 2024-06-24T17:15:10.259000+00:00
Original source

Yeah, unable to reproduce on dev.

rektbyfaith
Administrator
0
06-24-2024, 05:15 PM
#5
Archived author: jackpoz • Posted: 2024-06-24T17:15:30.252000+00:00
Original source

Well, just add a bounds check there
rektbyfaith
06-24-2024, 05:15 PM #5

Archived author: jackpoz • Posted: 2024-06-24T17:15:30.252000+00:00
Original source

Well, just add a bounds check there

rektbyfaith
Administrator
0
06-24-2024, 05:15 PM
#6
Archived author: jackpoz • Posted: 2024-06-24T17:15:48.227000+00:00
Original source

And log a lot of stuff when that is out of bounds
rektbyfaith
06-24-2024, 05:15 PM #6

Archived author: jackpoz • Posted: 2024-06-24T17:15:48.227000+00:00
Original source

And log a lot of stuff when that is out of bounds

rektbyfaith
Administrator
0
06-24-2024, 05:18 PM
#7
Archived author: jackpoz • Posted: 2024-06-24T17:18:51.501000+00:00
Original source

tri.idx0 or tri.idx2 are outside of points array bounds
rektbyfaith
06-24-2024, 05:18 PM #7

Archived author: jackpoz • Posted: 2024-06-24T17:18:51.501000+00:00
Original source

tri.idx0 or tri.idx2 are outside of points array bounds

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)