|
@@ -293,6 +293,30 @@ void AIPlayer::clearAim()
|
|
|
mAimOffset = Point3F(0.0f, 0.0f, 0.0f);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Sets the correct aim for the bot to the target
|
|
|
+ */
|
|
|
+void AIPlayer::getMuzzleVector(U32 imageSlot,VectorF* vec)
|
|
|
+{
|
|
|
+ MatrixF mat;
|
|
|
+ getMuzzleTransform(imageSlot,&mat);
|
|
|
+
|
|
|
+ MountedImage& image = mMountedImageList[imageSlot];
|
|
|
+
|
|
|
+ if (image.dataBlock->correctMuzzleVector)
|
|
|
+ {
|
|
|
+ disableHeadZCalc();
|
|
|
+ if (getCorrectedAim(mat, vec))
|
|
|
+ {
|
|
|
+ enableHeadZCalc();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ enableHeadZCalc();
|
|
|
+
|
|
|
+ }
|
|
|
+ mat.getColumn(1,vec);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Set the state of a movement trigger.
|
|
|
*
|