diff --git a/src/sgame/sg_bot_util.cpp b/src/sgame/sg_bot_util.cpp index 56982ea90bd..d3a4c3931a1 100644 --- a/src/sgame/sg_bot_util.cpp +++ b/src/sgame/sg_bot_util.cpp @@ -1576,6 +1576,19 @@ void BotAimAtEnemy( gentity_t *self ) } } +// the argument 'target' is somehow related to the bot's frame of reference. +// that is, it only works with the usual absolute coordinates if the bot's +// current normal vector (x, y, z) is (0, 0, 1), as given by: +// vec3_t normalVector; +// BG_GetClientNormal( &self->client->ps, normalVector); +// this is not the case if an alien bot activates the wall climb, and is on +// a non-horizontal surface. +// TODO: +// maybe make two functions instead of this one: +// - BotAimAtLocationRelative (this function) +// - BotAimAtLocationAbsolute (for locations in the global frame of reference) +// alternatively, provide a linear map and its inverse, to transform between +// the two frames of reference. void BotAimAtLocation( gentity_t *self, const glm::vec3 &target ) { glm::vec3 aimVec, aimAngles, viewBase;