mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-20 08:00:56 +00:00
- cansee refactoring, part 3
This commit is contained in:
parent
80412bdc51
commit
3da68ab038
9 changed files with 21 additions and 21 deletions
|
@ -105,8 +105,8 @@ static void handThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
|
@ -122,8 +122,8 @@ static void houndThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
|
@ -89,8 +89,8 @@ static void innocThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
|
@ -202,8 +202,8 @@ static void aiPodChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
|
@ -100,8 +100,8 @@ static void ratThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
|
@ -208,9 +208,9 @@ static void spidThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist) {
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector())) {
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery) {
|
||||
aiSetTarget(actor, actor->GetTarget());
|
||||
|
||||
|
|
|
@ -305,8 +305,8 @@ static void sub_72934(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
|
@ -134,8 +134,8 @@ static void zombaThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
@ -180,8 +180,8 @@ static void zombaThinkPonder(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
|
@ -129,8 +129,8 @@ static void zombfThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) * REPEAT_SCALE;
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue