mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-06 19:01:06 +03:00
fixed targeting (#1080)
This commit is contained in:
parent
5c84d59f4e
commit
2b49e4edcf
1 changed files with 5 additions and 5 deletions
|
@ -327,9 +327,9 @@ namespace TEN::Entities::Creatures::TR5
|
|||
GameVector eye = GameVector::Zero;
|
||||
eye.RoomNumber = item->RoomNumber;
|
||||
|
||||
int cosX = MAX_VISIBILITY_DISTANCE * phd_cos(targetOrient.x);
|
||||
|
||||
eye.x = origin1.x + (cosX * phd_sin(item->Pose.Orientation.y));
|
||||
int cosX = MAX_VISIBILITY_DISTANCE * phd_cos(targetOrient.x - ANGLE(23.45f));
|
||||
|
||||
eye.x = origin1.x + (cosX * phd_sin(item->Pose.Orientation.y ));
|
||||
eye.y = origin1.y + (MAX_VISIBILITY_DISTANCE * phd_sin(-(targetOrient.x - GUARDIAN_ORIENT_OFFSET.x)));
|
||||
eye.z = origin1.z + (cosX * phd_cos(item->Pose.Orientation.y));
|
||||
|
||||
|
@ -360,7 +360,7 @@ namespace TEN::Entities::Creatures::TR5
|
|||
origin1.RoomNumber = item->RoomNumber;
|
||||
guardian->LOS[i] = LOS(&origin1, &eye);
|
||||
SpawnElectricity(origin1.ToVector3(), eye.ToVector3(), (GetRandomControl() & 1) + 3, color.x, color.y, color.z, 46, (int)ElectricityFlags::Spline | (int)ElectricityFlags::ThinIn | (int)ElectricityFlags::ThinOut, 6, 10);
|
||||
guardian->fireArcs[i] = &ElectricityArcs.back();
|
||||
guardian->fireArcs[i] = &ElectricityArcs.back();
|
||||
StopSoundEffect(SFX_TR5_GOD_HEAD_CHARGE);
|
||||
SoundEffect(SFX_TR5_GOD_HEAD_BLAST, &item->Pose);
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ namespace TEN::Entities::Creatures::TR5
|
|||
if (adx < 280 && ady < 280 && adz < 280)
|
||||
farAway = 2;
|
||||
|
||||
Vector3i hitPos;
|
||||
Vector3i hitPos = Vector3i::Zero;
|
||||
MESH_INFO* hitMesh = nullptr;
|
||||
|
||||
GameVector start = GameVector(guardian->fireArcs[i]->pos1.x, guardian->fireArcs[i]->pos1.y, guardian->fireArcs[i]->pos1.z);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue