s/WayPoint/Waypoint/g

This commit is contained in:
Bill Currie 2003-07-24 18:25:46 +00:00
parent d81bb81732
commit ae3e600a7f
5 changed files with 64 additions and 64 deletions

View file

@ -244,7 +244,7 @@ void() FixWaypoints;
float() begin_route; float() begin_route;
void(entity this, float direct) bot_get_path; void(entity this, float direct) bot_get_path;
void() WaypointThink; void() WaypointThink;
entity(entity start) FindWayPoint; entity(entity start) FindWaypoint;
// physics & movement // physics & movement
float(entity e) bot_can_rj; float(entity e) bot_can_rj;

View file

@ -144,7 +144,7 @@ Bot has lost its target.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/ */
-(void)lost:(WayPoint)targ :(integer)success -(void)lost:(Waypoint)targ :(integer)success
{ {
if (!targ) if (!targ)
return; return;
@ -156,8 +156,8 @@ Bot has lost its target.
// find a new route // find a new route
if (!success) { if (!success) {
targets[0] = targets[1] = targets[2] = targets[3] = NIL; targets[0] = targets[1] = targets[2] = targets[3] = NIL;
last_way = [self findWayPoint:current_way]; last_way = [self findWaypoint:current_way];
[WayPoint clearMyRoute:self]; [Waypoint clearMyRoute:self];
b_aiflags = 0; b_aiflags = 0;
} else { } else {
if (targ.ent.classname == "item_artifact_invisibility") if (targ.ent.classname == "item_artifact_invisibility")
@ -188,7 +188,7 @@ removed.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/ */
-(void)check_lost:(WayPoint)targ -(void)check_lost:(Waypoint)targ
{ {
local vector dist; local vector dist;
@ -421,7 +421,7 @@ confused
-(void)path -(void)path
{ {
local WayPoint jj, tele; local Waypoint jj, tele;
local entity e; local entity e;
[self check_lost:targets[0]]; [self check_lost:targets[0]];
@ -745,7 +745,7 @@ frame, the ai_time limits it's actual updating
ent.button2 = 0; ent.button2 = 0;
keys = 0; keys = 0;
b_aiflags = 0; b_aiflags = 0;
[WayPoint clearMyRoute:self]; [Waypoint clearMyRoute:self];
targets[0] = targets[1] = targets[2] = targets[3] = ent.enemy = NIL; targets[0] = targets[1] = targets[2] = targets[3] = ent.enemy = NIL;
last_way = NIL; last_way = NIL;
return; return;

View file

@ -160,7 +160,7 @@ float sv_accelerate, sv_maxspeed, sv_stopspeed;
entity fixer; entity fixer;
Bot route_table; Bot route_table;
entity b_temp1, b_temp2, b_temp3; entity b_temp1, b_temp2, b_temp3;
WayPoint way_head; Waypoint way_head;
float busy_waypoints; float busy_waypoints;
float coop = 0; // hack float coop = 0; // hack
@ -432,7 +432,7 @@ ClientNextAvailable =
return -1; return -1;
}; };
void(WayPoint e1, WayPoint e2, integer flag) DeveloperLightning = {}; void(Waypoint e1, Waypoint e2, integer flag) DeveloperLightning = {};
// BotConnect and related functions. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // BotConnect and related functions. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

View file

@ -44,7 +44,7 @@ this notice in its entirety.
#include "libfrikbot.h" #include "libfrikbot.h"
WayPoint way_foot; // Ugh. Do I need a foot for this or not? Waypoint way_foot; // Ugh. Do I need a foot for this or not?
@implementation Target @implementation Target
@ -74,9 +74,9 @@ WayPoint way_foot; // Ugh. Do I need a foot for this or not?
// Waypoint Linking code ====================================================== // Waypoint Linking code ======================================================
@implementation WayPoint @implementation Waypoint
-(integer)isLinkedTo:(WayPoint)way -(integer)isLinkedTo:(Waypoint)way
{ {
local integer i; local integer i;
@ -93,7 +93,7 @@ WayPoint way_foot; // Ugh. Do I need a foot for this or not?
return 0; return 0;
} }
-(integer)linkWay:(WayPoint)way -(integer)linkWay:(Waypoint)way
{ {
local integer i; local integer i;
@ -112,7 +112,7 @@ WayPoint way_foot; // Ugh. Do I need a foot for this or not?
} }
// Link Ways part 2, used only for teleporters // Link Ways part 2, used only for teleporters
-(integer)teleLinkWay:(WayPoint)way -(integer)teleLinkWay:(Waypoint)way
{ {
local integer i; local integer i;
@ -131,7 +131,7 @@ WayPoint way_foot; // Ugh. Do I need a foot for this or not?
return 0; return 0;
} }
-(void)unlinkWay:(WayPoint)way -(void)unlinkWay:(Waypoint)way
{ {
local integer i; local integer i;
@ -212,7 +212,7 @@ Waypoint Loading from file
+(void)clearAll +(void)clearAll
{ {
local WayPoint t, n; local Waypoint t, n;
t = way_head; t = way_head;
while(t) { while(t) {
@ -225,9 +225,9 @@ Waypoint Loading from file
waypoints = 0; waypoints = 0;
} }
+(WayPoint)waypointForNum:(integer)num +(Waypoint)waypointForNum:(integer)num
{ {
local WayPoint t; local Waypoint t;
if (!num) if (!num)
return NIL; return NIL;
@ -242,15 +242,15 @@ Waypoint Loading from file
-(void)fix -(void)fix
{ {
targets[0] = [WayPoint waypointForNum:b_pants]; targets[0] = [Waypoint waypointForNum:b_pants];
targets[1] = [WayPoint waypointForNum:b_skill]; targets[1] = [Waypoint waypointForNum:b_skill];
targets[2] = [WayPoint waypointForNum:b_shirt]; targets[2] = [Waypoint waypointForNum:b_shirt];
targets[3] = [WayPoint waypointForNum:b_frags]; targets[3] = [Waypoint waypointForNum:b_frags];
} }
+(void) fixWaypoints +(void) fixWaypoints
{ {
local WayPoint way; local Waypoint way;
for (way = way_head; way; way = way.next) for (way = way_head; way; way = way.next)
[way fix]; [way fix];
@ -268,7 +268,7 @@ Route & path table management
{ {
// cleans up route table // cleans up route table
local WayPoint t; local Waypoint t;
t = way_head; t = way_head;
while (t) { while (t) {
t.keys = FALSE; t.keys = FALSE;
@ -281,7 +281,7 @@ Route & path table management
+(void)clearMyRoute:(Bot) bot +(void)clearMyRoute:(Bot) bot
{ {
local integer flag; local integer flag;
local WayPoint t; local Waypoint t;
flag = ClientBitFlag(bot.b_clientno); flag = ClientBitFlag(bot.b_clientno);
@ -303,7 +303,7 @@ tripping the runaway loop counter
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/ */
-(void)followLink:(WayPoint)e2 :(integer)b_bit -(void)followLink:(Waypoint)e2 :(integer)b_bit
{ {
local float dist; local float dist;
@ -380,7 +380,7 @@ BSP/QC Waypoint loading
void() waypoint = void() waypoint =
{ {
local WayPoint way = [[WayPoint alloc] initFromEntity: @self]; local Waypoint way = [[Waypoint alloc] initFromEntity: @self];
/* /*
self.search_time = time; self.search_time = time;
self.solid = SOLID_TRIGGER; self.solid = SOLID_TRIGGER;
@ -409,7 +409,7 @@ void() waypoint =
void(vector org, vector bit1, integer bit4, integer flargs) make_way = void(vector org, vector bit1, integer bit4, integer flargs) make_way =
{ {
local WayPoint y = [[WayPoint alloc] initAt:org]; local Waypoint y = [[Waypoint alloc] initAt:org];
//local entity y; //local entity y;
//waypoint_mode = WM_LOADED; //waypoint_mode = WM_LOADED;
//y = make_waypoint(org); //y = make_waypoint(org);
@ -436,9 +436,9 @@ functions big lag causer
Finds the closest, fisible, waypoint to e Finds the closest, fisible, waypoint to e
*/ */
-(WayPoint)findWayPoint:(WayPoint)start -(Waypoint)findWaypoint:(Waypoint)start
{ {
local WayPoint best, t; local Waypoint best, t;
local float dst, tdst; local float dst, tdst;
local vector org; local vector org;
@ -472,9 +472,9 @@ Finds the closest, fisible, waypoint to e
return best; return best;
} }
-(void)deleteWaypoint:(WayPoint)what -(void)deleteWaypoint:(Waypoint)what
{ {
local WayPoint t; local Waypoint t;
if (way_head == what) if (way_head == what)
way_head = what.next; way_head = what.next;
@ -539,10 +539,10 @@ an object.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/ */
-(WayPoint)findRoute:(WayPoint)lastone -(Waypoint)findRoute:(Waypoint)lastone
{ {
// kinda like FindWaypoint, only of this bots route though // kinda like FindWaypoint, only of this bots route though
local WayPoint t, best; local Waypoint t, best;
local float dst, tdst; local float dst, tdst;
local integer flag; local integer flag;
@ -578,13 +578,13 @@ different bot.
-(void)mark_path:(entity)this -(void)mark_path:(entity)this
{ {
local WayPoint t; local Waypoint t;
local integer flag; local integer flag;
local Bot bot = (Bot)this.@this; local Bot bot = (Bot)this.@this;
[WayPoint clearMyRoute:self]; [Waypoint clearMyRoute:self];
t = [this.@this findWayPoint:bot.current_way]; t = [this.@this findWaypoint:bot.current_way];
// FIXME // FIXME
// ugh, better way to find players please!!! // ugh, better way to find players please!!!
if (this.classname != "player") if (this.classname != "player")
@ -639,8 +639,8 @@ Boy it's confusing.
} }
route_table = self; route_table = self;
[WayPoint clearRouteTable]; [Waypoint clearRouteTable];
last_way = [self findWayPoint:current_way]; last_way = [self findWaypoint:current_way];
if (last_way != NIL) { if (last_way != NIL) {
last_way.items = vlen(self.last_way.origin - ent.origin); last_way.items = vlen(self.last_way.origin - ent.origin);
@ -656,7 +656,7 @@ Boy it's confusing.
} }
} }
-(void)get_path:(WayPoint)this :(integer)direct -(void)get_path:(Waypoint)this :(integer)direct
{ {
if (this == NIL) if (this == NIL)
return; return;
@ -711,7 +711,7 @@ very good all things considered.
*/ */
-(void)dynamicWaypoint -(void)dynamicWaypoint
{ {
local WayPoint t; local Waypoint t;
local float dist, dynlink = 0, dynpoint = 0, editor = 0; local float dist, dynlink = 0, dynpoint = 0, editor = 0;
if (teleport_time > portal_time) { if (teleport_time > portal_time) {
@ -786,7 +786,7 @@ very good all things considered.
// display the links for editor mode // display the links for editor mode
if (editor) { if (editor) {
if (self.current_way) { if (self.current_way) {
local WayPoint way = self.current_way; local Waypoint way = self.current_way;
local integer i; local integer i;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
@ -800,7 +800,7 @@ very good all things considered.
return; return;
} }
t = [self findWayPoint:current_way]; t = [self findWaypoint:current_way];
if (t) { if (t) {
dist = vlen (ent.origin - t.origin); dist = vlen (ent.origin - t.origin);
if (dist < 192) { if (dist < 192) {
@ -849,7 +849,7 @@ very good all things considered.
dyn_dest = ent.origin + ent.view_ofs; dyn_dest = ent.origin + ent.view_ofs;
if (!dynpoint) if (!dynpoint)
return; return;
t = [[WayPoint alloc] initAt:dyn_dest]; t = [[Waypoint alloc] initAt:dyn_dest];
if (!dyn_flags) { if (!dyn_flags) {
if ([t canSee:current_way ignoring:ent]) if ([t canSee:current_way ignoring:ent])

View file

@ -1,7 +1,7 @@
#include "Entity.h" #include "Entity.h"
@class Bot; @class Bot;
@class WayPoint; @class Waypoint;
@interface Target: Entity @interface Target: Entity
{ {
@ -10,11 +10,11 @@
-(integer)canSee:(Target)targ ignoring:(entity)ignore; -(integer)canSee:(Target)targ ignoring:(entity)ignore;
@end @end
@interface WayPoint: Target @interface Waypoint: Target
{ {
@public @public
WayPoint [4] targets; Waypoint [4] targets;
WayPoint next, prev; Waypoint next, prev;
integer flags; integer flags;
vector origin; vector origin;
integer count; integer count;
@ -22,11 +22,11 @@
integer b_pants, b_skill, b_shirt, b_frags, b_sound; integer b_pants, b_skill, b_shirt, b_frags, b_sound;
integer keys; integer keys;
float items; float items;
WayPoint enemy; Waypoint enemy;
float search_time; float search_time;
} }
+(void)clearAll; +(void)clearAll;
+(WayPoint)waypointForNum:(integer)num; +(Waypoint)waypointForNum:(integer)num;
+(void)fixWaypoints; +(void)fixWaypoints;
+(void)clearRouteTable; +(void)clearRouteTable;
@ -37,12 +37,12 @@
-(id)initAt:(vector)org; -(id)initAt:(vector)org;
-(id)initFromEntity:(entity)ent; -(id)initFromEntity:(entity)ent;
-(integer)isLinkedTo:(WayPoint)way; -(integer)isLinkedTo:(Waypoint)way;
-(integer)linkWay:(WayPoint)way; -(integer)linkWay:(Waypoint)way;
-(integer)teleLinkWay:(WayPoint)way; -(integer)teleLinkWay:(Waypoint)way;
-(void)unlinkWay:(WayPoint)way; -(void)unlinkWay:(Waypoint)way;
-(void)followLink:(WayPoint)e2 :(integer)b_bit; -(void)followLink:(Waypoint)e2 :(integer)b_bit;
-(void)waypointThink; -(void)waypointThink;
@end @end
@ -79,7 +79,7 @@
integer route_failed; integer route_failed;
integer dyn_flags, dyn_plat; integer dyn_flags, dyn_plat;
float dyn_time; float dyn_time;
WayPoint temp_way, last_way, current_way; Waypoint temp_way, last_way, current_way;
entity [4] targets; entity [4] targets;
entity avoid; entity avoid;
vector obs_dir; vector obs_dir;
@ -124,8 +124,8 @@
-(integer)target_onstack:(entity)scot; -(integer)target_onstack:(entity)scot;
-(void)target_add:(entity)e; -(void)target_add:(entity)e;
-(void)target_drop:(entity)e; -(void)target_drop:(entity)e;
-(void)lost:(WayPoint)targ :(integer)success; -(void)lost:(Waypoint)targ :(integer)success;
-(void)check_lost:(WayPoint)targ; -(void)check_lost:(Waypoint)targ;
-(void)handle_ai; -(void)handle_ai;
-(void)path; -(void)path;
-(float)priority_for_thing:(entity)thing; -(float)priority_for_thing:(entity)thing;
@ -143,12 +143,12 @@
@end @end
@interface Bot (Way) @interface Bot (Way)
-(WayPoint)findWayPoint:(WayPoint)start; -(Waypoint)findWaypoint:(Waypoint)start;
-(void)deleteWaypoint:(WayPoint)what; -(void)deleteWaypoint:(Waypoint)what;
-(entity)findThing:(string)s; -(entity)findThing:(string)s;
-(WayPoint)findRoute:(WayPoint)lastone; -(Waypoint)findRoute:(Waypoint)lastone;
-(void)mark_path:(entity)this; -(void)mark_path:(entity)this;
-(void)get_path:(WayPoint)this :(integer)direct; -(void)get_path:(Waypoint)this :(integer)direct;
-(integer)begin_route; -(integer)begin_route;
-(void)spawnTempWaypoint:(vector)org; -(void)spawnTempWaypoint:(vector)org;
-(void)dynamicWaypoint; -(void)dynamicWaypoint;
@ -239,7 +239,7 @@
@extern entity fixer; @extern entity fixer;
@extern Bot route_table; @extern Bot route_table;
@extern entity b_temp1, b_temp2, b_temp3; @extern entity b_temp1, b_temp2, b_temp3;
@extern WayPoint way_head; @extern Waypoint way_head;
@extern float busy_waypoints; @extern float busy_waypoints;
@extern float coop; @extern float coop;
@ -287,7 +287,7 @@
@extern void() BotSayInit; @extern void() BotSayInit;
@extern void(string h) BotSay2; @extern void(string h) BotSay2;
@extern void(string h) BotSayTeam; @extern void(string h) BotSayTeam;
@extern void(WayPoint e1, WayPoint e2, integer flag) DeveloperLightning; @extern void(Waypoint e1, Waypoint e2, integer flag) DeveloperLightning;
/* /*
angles is pitch yaw roll angles is pitch yaw roll