mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-22 03:51:12 +00:00
s/WayPoint/Waypoint/g
This commit is contained in:
parent
d81bb81732
commit
ae3e600a7f
5 changed files with 64 additions and 64 deletions
|
@ -244,7 +244,7 @@ void() FixWaypoints;
|
|||
float() begin_route;
|
||||
void(entity this, float direct) bot_get_path;
|
||||
void() WaypointThink;
|
||||
entity(entity start) FindWayPoint;
|
||||
entity(entity start) FindWaypoint;
|
||||
|
||||
// physics & movement
|
||||
float(entity e) bot_can_rj;
|
||||
|
|
|
@ -144,7 +144,7 @@ Bot has lost its target.
|
|||
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
*/
|
||||
-(void)lost:(WayPoint)targ :(integer)success
|
||||
-(void)lost:(Waypoint)targ :(integer)success
|
||||
{
|
||||
if (!targ)
|
||||
return;
|
||||
|
@ -156,8 +156,8 @@ Bot has lost its target.
|
|||
// find a new route
|
||||
if (!success) {
|
||||
targets[0] = targets[1] = targets[2] = targets[3] = NIL;
|
||||
last_way = [self findWayPoint:current_way];
|
||||
[WayPoint clearMyRoute:self];
|
||||
last_way = [self findWaypoint:current_way];
|
||||
[Waypoint clearMyRoute:self];
|
||||
b_aiflags = 0;
|
||||
} else {
|
||||
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;
|
||||
|
||||
|
@ -421,7 +421,7 @@ confused
|
|||
-(void)path
|
||||
{
|
||||
|
||||
local WayPoint jj, tele;
|
||||
local Waypoint jj, tele;
|
||||
local entity e;
|
||||
|
||||
[self check_lost:targets[0]];
|
||||
|
@ -745,7 +745,7 @@ frame, the ai_time limits it's actual updating
|
|||
ent.button2 = 0;
|
||||
keys = 0;
|
||||
b_aiflags = 0;
|
||||
[WayPoint clearMyRoute:self];
|
||||
[Waypoint clearMyRoute:self];
|
||||
targets[0] = targets[1] = targets[2] = targets[3] = ent.enemy = NIL;
|
||||
last_way = NIL;
|
||||
return;
|
||||
|
|
|
@ -160,7 +160,7 @@ float sv_accelerate, sv_maxspeed, sv_stopspeed;
|
|||
entity fixer;
|
||||
Bot route_table;
|
||||
entity b_temp1, b_temp2, b_temp3;
|
||||
WayPoint way_head;
|
||||
Waypoint way_head;
|
||||
float busy_waypoints;
|
||||
|
||||
float coop = 0; // hack
|
||||
|
@ -432,7 +432,7 @@ ClientNextAvailable =
|
|||
return -1;
|
||||
};
|
||||
|
||||
void(WayPoint e1, WayPoint e2, integer flag) DeveloperLightning = {};
|
||||
void(Waypoint e1, Waypoint e2, integer flag) DeveloperLightning = {};
|
||||
|
||||
// BotConnect and related functions. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ this notice in its entirety.
|
|||
|
||||
#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
|
||||
|
||||
|
@ -74,9 +74,9 @@ WayPoint way_foot; // Ugh. Do I need a foot for this or not?
|
|||
|
||||
// Waypoint Linking code ======================================================
|
||||
|
||||
@implementation WayPoint
|
||||
@implementation Waypoint
|
||||
|
||||
-(integer)isLinkedTo:(WayPoint)way
|
||||
-(integer)isLinkedTo:(Waypoint)way
|
||||
{
|
||||
local integer i;
|
||||
|
||||
|
@ -93,7 +93,7 @@ WayPoint way_foot; // Ugh. Do I need a foot for this or not?
|
|||
return 0;
|
||||
}
|
||||
|
||||
-(integer)linkWay:(WayPoint)way
|
||||
-(integer)linkWay:(Waypoint)way
|
||||
{
|
||||
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
|
||||
-(integer)teleLinkWay:(WayPoint)way
|
||||
-(integer)teleLinkWay:(Waypoint)way
|
||||
{
|
||||
local integer i;
|
||||
|
||||
|
@ -131,7 +131,7 @@ WayPoint way_foot; // Ugh. Do I need a foot for this or not?
|
|||
return 0;
|
||||
}
|
||||
|
||||
-(void)unlinkWay:(WayPoint)way
|
||||
-(void)unlinkWay:(Waypoint)way
|
||||
{
|
||||
local integer i;
|
||||
|
||||
|
@ -212,7 +212,7 @@ Waypoint Loading from file
|
|||
+(void)clearAll
|
||||
{
|
||||
|
||||
local WayPoint t, n;
|
||||
local Waypoint t, n;
|
||||
|
||||
t = way_head;
|
||||
while(t) {
|
||||
|
@ -225,9 +225,9 @@ Waypoint Loading from file
|
|||
waypoints = 0;
|
||||
}
|
||||
|
||||
+(WayPoint)waypointForNum:(integer)num
|
||||
+(Waypoint)waypointForNum:(integer)num
|
||||
{
|
||||
local WayPoint t;
|
||||
local Waypoint t;
|
||||
if (!num)
|
||||
return NIL;
|
||||
|
||||
|
@ -242,15 +242,15 @@ Waypoint Loading from file
|
|||
|
||||
-(void)fix
|
||||
{
|
||||
targets[0] = [WayPoint waypointForNum:b_pants];
|
||||
targets[1] = [WayPoint waypointForNum:b_skill];
|
||||
targets[2] = [WayPoint waypointForNum:b_shirt];
|
||||
targets[3] = [WayPoint waypointForNum:b_frags];
|
||||
targets[0] = [Waypoint waypointForNum:b_pants];
|
||||
targets[1] = [Waypoint waypointForNum:b_skill];
|
||||
targets[2] = [Waypoint waypointForNum:b_shirt];
|
||||
targets[3] = [Waypoint waypointForNum:b_frags];
|
||||
}
|
||||
|
||||
+(void) fixWaypoints
|
||||
{
|
||||
local WayPoint way;
|
||||
local Waypoint way;
|
||||
|
||||
for (way = way_head; way; way = way.next)
|
||||
[way fix];
|
||||
|
@ -268,7 +268,7 @@ Route & path table management
|
|||
{
|
||||
// cleans up route table
|
||||
|
||||
local WayPoint t;
|
||||
local Waypoint t;
|
||||
t = way_head;
|
||||
while (t) {
|
||||
t.keys = FALSE;
|
||||
|
@ -281,7 +281,7 @@ Route & path table management
|
|||
+(void)clearMyRoute:(Bot) bot
|
||||
{
|
||||
local integer flag;
|
||||
local WayPoint t;
|
||||
local Waypoint t;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -380,7 +380,7 @@ BSP/QC Waypoint loading
|
|||
|
||||
void() waypoint =
|
||||
{
|
||||
local WayPoint way = [[WayPoint alloc] initFromEntity: @self];
|
||||
local Waypoint way = [[Waypoint alloc] initFromEntity: @self];
|
||||
/*
|
||||
self.search_time = time;
|
||||
self.solid = SOLID_TRIGGER;
|
||||
|
@ -409,7 +409,7 @@ void() waypoint =
|
|||
|
||||
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;
|
||||
//waypoint_mode = WM_LOADED;
|
||||
//y = make_waypoint(org);
|
||||
|
@ -436,9 +436,9 @@ functions big lag causer
|
|||
|
||||
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 vector org;
|
||||
|
||||
|
@ -472,9 +472,9 @@ Finds the closest, fisible, waypoint to e
|
|||
return best;
|
||||
}
|
||||
|
||||
-(void)deleteWaypoint:(WayPoint)what
|
||||
-(void)deleteWaypoint:(Waypoint)what
|
||||
{
|
||||
local WayPoint t;
|
||||
local Waypoint t;
|
||||
|
||||
if (way_head == what)
|
||||
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
|
||||
local WayPoint t, best;
|
||||
local Waypoint t, best;
|
||||
local float dst, tdst;
|
||||
local integer flag;
|
||||
|
||||
|
@ -578,13 +578,13 @@ different bot.
|
|||
|
||||
-(void)mark_path:(entity)this
|
||||
{
|
||||
local WayPoint t;
|
||||
local Waypoint t;
|
||||
local integer flag;
|
||||
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
|
||||
// ugh, better way to find players please!!!
|
||||
if (this.classname != "player")
|
||||
|
@ -639,8 +639,8 @@ Boy it's confusing.
|
|||
}
|
||||
|
||||
route_table = self;
|
||||
[WayPoint clearRouteTable];
|
||||
last_way = [self findWayPoint:current_way];
|
||||
[Waypoint clearRouteTable];
|
||||
last_way = [self findWaypoint:current_way];
|
||||
|
||||
if (last_way != NIL) {
|
||||
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)
|
||||
return;
|
||||
|
@ -711,7 +711,7 @@ very good all things considered.
|
|||
*/
|
||||
-(void)dynamicWaypoint
|
||||
{
|
||||
local WayPoint t;
|
||||
local Waypoint t;
|
||||
local float dist, dynlink = 0, dynpoint = 0, editor = 0;
|
||||
|
||||
if (teleport_time > portal_time) {
|
||||
|
@ -786,7 +786,7 @@ very good all things considered.
|
|||
// display the links for editor mode
|
||||
if (editor) {
|
||||
if (self.current_way) {
|
||||
local WayPoint way = self.current_way;
|
||||
local Waypoint way = self.current_way;
|
||||
local integer i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
@ -800,7 +800,7 @@ very good all things considered.
|
|||
return;
|
||||
}
|
||||
|
||||
t = [self findWayPoint:current_way];
|
||||
t = [self findWaypoint:current_way];
|
||||
if (t) {
|
||||
dist = vlen (ent.origin - t.origin);
|
||||
if (dist < 192) {
|
||||
|
@ -849,7 +849,7 @@ very good all things considered.
|
|||
dyn_dest = ent.origin + ent.view_ofs;
|
||||
if (!dynpoint)
|
||||
return;
|
||||
t = [[WayPoint alloc] initAt:dyn_dest];
|
||||
t = [[Waypoint alloc] initAt:dyn_dest];
|
||||
|
||||
if (!dyn_flags) {
|
||||
if ([t canSee:current_way ignoring:ent])
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "Entity.h"
|
||||
|
||||
@class Bot;
|
||||
@class WayPoint;
|
||||
@class Waypoint;
|
||||
|
||||
@interface Target: Entity
|
||||
{
|
||||
|
@ -10,11 +10,11 @@
|
|||
-(integer)canSee:(Target)targ ignoring:(entity)ignore;
|
||||
@end
|
||||
|
||||
@interface WayPoint: Target
|
||||
@interface Waypoint: Target
|
||||
{
|
||||
@public
|
||||
WayPoint [4] targets;
|
||||
WayPoint next, prev;
|
||||
Waypoint [4] targets;
|
||||
Waypoint next, prev;
|
||||
integer flags;
|
||||
vector origin;
|
||||
integer count;
|
||||
|
@ -22,11 +22,11 @@
|
|||
integer b_pants, b_skill, b_shirt, b_frags, b_sound;
|
||||
integer keys;
|
||||
float items;
|
||||
WayPoint enemy;
|
||||
Waypoint enemy;
|
||||
float search_time;
|
||||
}
|
||||
+(void)clearAll;
|
||||
+(WayPoint)waypointForNum:(integer)num;
|
||||
+(Waypoint)waypointForNum:(integer)num;
|
||||
+(void)fixWaypoints;
|
||||
|
||||
+(void)clearRouteTable;
|
||||
|
@ -37,12 +37,12 @@
|
|||
-(id)initAt:(vector)org;
|
||||
-(id)initFromEntity:(entity)ent;
|
||||
|
||||
-(integer)isLinkedTo:(WayPoint)way;
|
||||
-(integer)linkWay:(WayPoint)way;
|
||||
-(integer)teleLinkWay:(WayPoint)way;
|
||||
-(void)unlinkWay:(WayPoint)way;
|
||||
-(integer)isLinkedTo:(Waypoint)way;
|
||||
-(integer)linkWay:(Waypoint)way;
|
||||
-(integer)teleLinkWay:(Waypoint)way;
|
||||
-(void)unlinkWay:(Waypoint)way;
|
||||
|
||||
-(void)followLink:(WayPoint)e2 :(integer)b_bit;
|
||||
-(void)followLink:(Waypoint)e2 :(integer)b_bit;
|
||||
-(void)waypointThink;
|
||||
@end
|
||||
|
||||
|
@ -79,7 +79,7 @@
|
|||
integer route_failed;
|
||||
integer dyn_flags, dyn_plat;
|
||||
float dyn_time;
|
||||
WayPoint temp_way, last_way, current_way;
|
||||
Waypoint temp_way, last_way, current_way;
|
||||
entity [4] targets;
|
||||
entity avoid;
|
||||
vector obs_dir;
|
||||
|
@ -124,8 +124,8 @@
|
|||
-(integer)target_onstack:(entity)scot;
|
||||
-(void)target_add:(entity)e;
|
||||
-(void)target_drop:(entity)e;
|
||||
-(void)lost:(WayPoint)targ :(integer)success;
|
||||
-(void)check_lost:(WayPoint)targ;
|
||||
-(void)lost:(Waypoint)targ :(integer)success;
|
||||
-(void)check_lost:(Waypoint)targ;
|
||||
-(void)handle_ai;
|
||||
-(void)path;
|
||||
-(float)priority_for_thing:(entity)thing;
|
||||
|
@ -143,12 +143,12 @@
|
|||
@end
|
||||
|
||||
@interface Bot (Way)
|
||||
-(WayPoint)findWayPoint:(WayPoint)start;
|
||||
-(void)deleteWaypoint:(WayPoint)what;
|
||||
-(Waypoint)findWaypoint:(Waypoint)start;
|
||||
-(void)deleteWaypoint:(Waypoint)what;
|
||||
-(entity)findThing:(string)s;
|
||||
-(WayPoint)findRoute:(WayPoint)lastone;
|
||||
-(Waypoint)findRoute:(Waypoint)lastone;
|
||||
-(void)mark_path:(entity)this;
|
||||
-(void)get_path:(WayPoint)this :(integer)direct;
|
||||
-(void)get_path:(Waypoint)this :(integer)direct;
|
||||
-(integer)begin_route;
|
||||
-(void)spawnTempWaypoint:(vector)org;
|
||||
-(void)dynamicWaypoint;
|
||||
|
@ -239,7 +239,7 @@
|
|||
@extern entity fixer;
|
||||
@extern Bot route_table;
|
||||
@extern entity b_temp1, b_temp2, b_temp3;
|
||||
@extern WayPoint way_head;
|
||||
@extern Waypoint way_head;
|
||||
@extern float busy_waypoints;
|
||||
|
||||
@extern float coop;
|
||||
|
@ -287,7 +287,7 @@
|
|||
@extern void() BotSayInit;
|
||||
@extern void(string h) BotSay2;
|
||||
@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
|
||||
|
|
Loading…
Reference in a new issue