}
};
+// Support for debugging tracewalk visually
+
void debugresetnodes()
{
debuglastnode = '0 0 0';
te_customflash(position, 40, 2, c);
}
-#ifdef DEBUG_BOT_GOALSTACK
+// Support for debugging the goal stack visually
.float goalcounter;
.vector lastposition;
// Debug the goal stack visually
void debuggoalstack()
{
- local entity target;
+ local entity goal;
local vector org;
- if(self.goalcounter==0)target=self.goalcurrent;
- else if(self.goalcounter==1)target=self.goalstack01;
- else if(self.goalcounter==2)target=self.goalstack02;
- else if(self.goalcounter==3)target=self.goalstack03;
- else if(self.goalcounter==4)target=self.goalstack04;
- else if(self.goalcounter==5)target=self.goalstack05;
- else if(self.goalcounter==6)target=self.goalstack06;
- else if(self.goalcounter==7)target=self.goalstack07;
- else if(self.goalcounter==8)target=self.goalstack08;
- else if(self.goalcounter==9)target=self.goalstack09;
- else if(self.goalcounter==10)target=self.goalstack10;
- else if(self.goalcounter==11)target=self.goalstack11;
- else if(self.goalcounter==12)target=self.goalstack12;
- else if(self.goalcounter==13)target=self.goalstack13;
- else if(self.goalcounter==14)target=self.goalstack14;
- else if(self.goalcounter==15)target=self.goalstack15;
- else if(self.goalcounter==16)target=self.goalstack16;
- else if(self.goalcounter==17)target=self.goalstack17;
- else if(self.goalcounter==18)target=self.goalstack18;
- else if(self.goalcounter==19)target=self.goalstack19;
- else if(self.goalcounter==20)target=self.goalstack20;
- else if(self.goalcounter==21)target=self.goalstack21;
- else if(self.goalcounter==22)target=self.goalstack22;
- else if(self.goalcounter==23)target=self.goalstack23;
- else if(self.goalcounter==24)target=self.goalstack24;
- else if(self.goalcounter==25)target=self.goalstack25;
- else if(self.goalcounter==26)target=self.goalstack26;
- else if(self.goalcounter==27)target=self.goalstack27;
- else if(self.goalcounter==28)target=self.goalstack28;
- else if(self.goalcounter==29)target=self.goalstack29;
- else if(self.goalcounter==30)target=self.goalstack30;
- else if(self.goalcounter==31)target=self.goalstack31;
-
- if(target==world)
+ if(self.goalcounter==0)goal=self.goalcurrent;
+ else if(self.goalcounter==1)goal=self.goalstack01;
+ else if(self.goalcounter==2)goal=self.goalstack02;
+ else if(self.goalcounter==3)goal=self.goalstack03;
+ else if(self.goalcounter==4)goal=self.goalstack04;
+ else if(self.goalcounter==5)goal=self.goalstack05;
+ else if(self.goalcounter==6)goal=self.goalstack06;
+ else if(self.goalcounter==7)goal=self.goalstack07;
+ else if(self.goalcounter==8)goal=self.goalstack08;
+ else if(self.goalcounter==9)goal=self.goalstack09;
+ else if(self.goalcounter==10)goal=self.goalstack10;
+ else if(self.goalcounter==11)goal=self.goalstack11;
+ else if(self.goalcounter==12)goal=self.goalstack12;
+ else if(self.goalcounter==13)goal=self.goalstack13;
+ else if(self.goalcounter==14)goal=self.goalstack14;
+ else if(self.goalcounter==15)goal=self.goalstack15;
+ else if(self.goalcounter==16)goal=self.goalstack16;
+ else if(self.goalcounter==17)goal=self.goalstack17;
+ else if(self.goalcounter==18)goal=self.goalstack18;
+ else if(self.goalcounter==19)goal=self.goalstack19;
+ else if(self.goalcounter==20)goal=self.goalstack20;
+ else if(self.goalcounter==21)goal=self.goalstack21;
+ else if(self.goalcounter==22)goal=self.goalstack22;
+ else if(self.goalcounter==23)goal=self.goalstack23;
+ else if(self.goalcounter==24)goal=self.goalstack24;
+ else if(self.goalcounter==25)goal=self.goalstack25;
+ else if(self.goalcounter==26)goal=self.goalstack26;
+ else if(self.goalcounter==27)goal=self.goalstack27;
+ else if(self.goalcounter==28)goal=self.goalstack28;
+ else if(self.goalcounter==29)goal=self.goalstack29;
+ else if(self.goalcounter==30)goal=self.goalstack30;
+ else if(self.goalcounter==31)goal=self.goalstack31;
+
+ if(goal==world)
{
self.goalcounter = 0;
self.lastposition='0 0 0';
org = self.lastposition;
- te_lightning2(world, org, target.origin);
- self.lastposition = target.origin;
+ te_lightning2(world, org, goal.origin);
+ self.lastposition = goal.origin;
self.goalcounter++;
}
-
-#endif