- added custom math routines for reliability.
This commit is contained in:
parent
7edd5e2dac
commit
161d03231a
50 changed files with 4027 additions and 122 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include "d_player.h"
|
||||
#include "p_spec.h"
|
||||
#include "p_checkposition.h"
|
||||
#include "math/cmath.h"
|
||||
|
||||
static FRandom pr_botopendoor ("BotOpenDoor");
|
||||
static FRandom pr_bottrywalk ("BotTryWalk");
|
||||
|
|
@ -348,7 +349,7 @@ void DBot::Pitch (AActor *target)
|
|||
double diff;
|
||||
|
||||
diff = target->Z() - player->mo->Z();
|
||||
aim = atan(diff / (double)player->mo->AproxDistance(target));
|
||||
aim = g_atan(diff / (double)player->mo->AproxDistance(target));
|
||||
player->mo->pitch = -(int)(aim * ANGLE_180/M_PI);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue