1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-20 04:09:16 +00:00

Fix plAvatar.

This commit is contained in:
Darryl Pogue
2012-01-29 01:46:06 -08:00
parent b1fb2e6dd0
commit 745378f9be
14 changed files with 28 additions and 25 deletions

View File

@ -330,8 +330,8 @@ void plAvBrainCritter::SightCone(float coneRad)
fSightConeAngle = coneRad;
// calculate the minimum dot product for the cone of sight (angle/2 vector dotted with straight ahead)
hsVector3 straightVector(1, 0, 0), viewVector(1, 0, 0);
hsQuat rotation(fSightConeAngle/2, &hsVector3(0, 1, 0));
hsVector3 straightVector(1, 0, 0), viewVector(1, 0, 0), up(0, 1, 0);
hsQuat rotation(fSightConeAngle/2, &up);
viewVector = hsVector3(rotation.Rotate(&viewVector));
viewVector.Normalize();
fSightConeDotMin = straightVector * viewVector;