mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-08 03:28:03 +03:00
Convert static position to PHD_3DPOS, fix crossbow bolt shatter, read/write proper shatter type
This commit is contained in:
parent
2f3af7e3ea
commit
f8d9edeb81
22 changed files with 189 additions and 200 deletions
|
@ -89,12 +89,12 @@ namespace TEN::Renderer
|
|||
STATIC_INFO* sinfo = &StaticObjects[mesh->staticNumber];
|
||||
Vector3 min = Vector3(sinfo->visibilityBox.X1, sinfo->visibilityBox.Y1, sinfo->visibilityBox.Z1);
|
||||
Vector3 max = Vector3(sinfo->visibilityBox.X2, sinfo->visibilityBox.Y2, sinfo->visibilityBox.Z2);
|
||||
min += Vector3(mesh->x, mesh->y, mesh->z);
|
||||
max += Vector3(mesh->x, mesh->y, mesh->z);
|
||||
min += Vector3(mesh->pos.xPos, mesh->pos.yPos, mesh->pos.zPos);
|
||||
max += Vector3(mesh->pos.xPos, mesh->pos.yPos, mesh->pos.zPos);
|
||||
if (!renderView.camera.frustum.AABBInFrustum(min, max))
|
||||
continue;
|
||||
Matrix rotation = Matrix::CreateRotationY(TO_RAD(mesh->yRot));
|
||||
Vector3 translation = Vector3(mesh->x, mesh->y, mesh->z);
|
||||
Matrix rotation = Matrix::CreateRotationY(TO_RAD(mesh->pos.yRot));
|
||||
Vector3 translation = Vector3(mesh->pos.xPos, mesh->pos.yPos, mesh->pos.zPos);
|
||||
newStatic->Mesh = mesh;
|
||||
newStatic->RoomIndex = roomNumber;
|
||||
newStatic->World = rotation * Matrix::CreateTranslation(translation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue