mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-10 06:31:52 +00:00
Update for the int changes.
This commit is contained in:
parent
7d1f271764
commit
6d921e4f75
30 changed files with 208 additions and 208 deletions
|
@ -1315,7 +1315,7 @@ void(entity targ, entity attacker) ClientObituary =
|
|||
local float attackerteam;
|
||||
local float targteam;
|
||||
#endif
|
||||
local integer gibbed = (targ.health < -40);
|
||||
local int gibbed = (targ.health < -40);
|
||||
|
||||
#ifdef QUAKEWORLD
|
||||
attackerteam = INFOKEY (attacker, "team");
|
||||
|
|
|
@ -537,7 +537,7 @@ void(vector org) launch_shrapnel =
|
|||
//and now the bomb code...
|
||||
void() ShrapnelExplode =
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
local vector direction;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define SPAWN_METAL 4
|
||||
#define SPAWN_WOOD 8
|
||||
|
||||
.integer gib_caught; // if a gib bounces more than 4 times it's removed
|
||||
.int gib_caught; // if a gib bounces more than 4 times it's removed
|
||||
|
||||
vector (float dm, vector dir) VelocityForRubble =
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ checks to see if an entity is on the bot's stack
|
|||
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
*/
|
||||
-(integer)targetOnstack:(Target *)scot
|
||||
-(int)targetOnstack:(Target *)scot
|
||||
{
|
||||
if (scot == nil)
|
||||
return FALSE;
|
||||
|
@ -150,7 +150,7 @@ Bot has lost its target.
|
|||
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
*/
|
||||
-(void)lost:(Target *)targ :(integer)success
|
||||
-(void)lost:(Target *)targ :(int)success
|
||||
{
|
||||
if (!targ)
|
||||
return;
|
||||
|
@ -525,9 +525,9 @@ the bot finds things it wants to kill/grab.
|
|||
// 50 - 90 bot will hunt these as vital items
|
||||
|
||||
// *!* Make sure you add code to checkLost to remove the target *!*
|
||||
-(integer)priority:(Bot *)bot
|
||||
-(int)priority:(Bot *)bot
|
||||
{
|
||||
local integer p;
|
||||
local int p;
|
||||
|
||||
if (ent.health <= 0)
|
||||
return 0;
|
||||
|
@ -551,9 +551,9 @@ the bot finds things it wants to kill/grab.
|
|||
return p;
|
||||
}
|
||||
|
||||
-(integer)priorityForThing:(Target *)thing
|
||||
-(int)priorityForThing:(Target *)thing
|
||||
{
|
||||
local integer p;
|
||||
local int p;
|
||||
// This is the most executed function in the bot. Careful what you do here.
|
||||
if (pointcontents ([thing origin]) < -3)
|
||||
return 0;
|
||||
|
@ -565,16 +565,16 @@ the bot finds things it wants to kill/grab.
|
|||
if (thing.current_way.distance == -1)
|
||||
return 0;
|
||||
else
|
||||
p += (integer) ((13000 - thing.current_way.distance) * 0.05);
|
||||
p += (int) ((13000 - thing.current_way.distance) * 0.05);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
-(void)lookForCrap:(integer)scope
|
||||
-(void)lookForCrap:(int)scope
|
||||
{
|
||||
local Target *foe, *best = nil;
|
||||
local Waypoint *way;
|
||||
local integer thatp, bestp;
|
||||
local int thatp, bestp;
|
||||
local float radius;
|
||||
|
||||
if (scope == 1)
|
||||
|
@ -730,7 +730,7 @@ frame, the ai_time limits it's actual updating
|
|||
// playerstatus bars, and the mod probably already compensated for that
|
||||
|
||||
if (ent.health < 1) {
|
||||
buttons = (integer) (random() * 2);
|
||||
buttons = (int) (random() * 2);
|
||||
keys = 0;
|
||||
b_aiflags = 0;
|
||||
[Waypoint clearMyRoute:self];
|
||||
|
|
|
@ -42,7 +42,7 @@ this notice in its entirety.
|
|||
|
||||
#include "libfrikbot.h"
|
||||
|
||||
integer bot_fight_linker;
|
||||
int bot_fight_linker;
|
||||
|
||||
/*
|
||||
weapon_range
|
||||
|
@ -51,7 +51,7 @@ weapon_range
|
|||
.y minimum range bot can be to be effective (rl/gl) (move away)
|
||||
.z maximum range bot can be to be effective (lg/axe) (move in)
|
||||
*/
|
||||
vector (integer wep)
|
||||
vector (int wep)
|
||||
weapon_range =
|
||||
{
|
||||
switch (wep) {
|
||||
|
@ -201,7 +201,7 @@ weapon_range =
|
|||
}
|
||||
}
|
||||
} else {
|
||||
local integer i = 0;
|
||||
local int i = 0;
|
||||
local Bot *foe;
|
||||
for (i = 0; i < 32; i++) {
|
||||
if (!(foe = players[i])) continue;
|
||||
|
@ -230,10 +230,10 @@ Pick a weapon based on range / ammo
|
|||
*/
|
||||
-(void)weaponSwitch:(float)brange
|
||||
{
|
||||
local integer it, flag = 0, pulse = 0;
|
||||
local int it, flag = 0, pulse = 0;
|
||||
local vector v;
|
||||
|
||||
it = (integer) ent.items & 127;
|
||||
it = (int) ent.items & 127;
|
||||
|
||||
while (it) {
|
||||
if ((ent.ammo_rockets >= 1) && (it & IT_ROCKET_LAUNCHER)) {
|
||||
|
@ -322,7 +322,7 @@ attacking an enemy.
|
|||
|
||||
// decide if I should shoot
|
||||
foedist = vlen (org - ent.origin);
|
||||
v = weapon_range ((integer)ent.weapon);
|
||||
v = weapon_range ((int)ent.weapon);
|
||||
if (foedist > v.y && foedist < v.z) {
|
||||
traceline (ent.origin + ent.view_ofs,
|
||||
ent.origin + ent.view_ofs + v_forward * v.z, FALSE, ent);
|
||||
|
|
|
@ -86,7 +86,7 @@ BotName
|
|||
|
||||
Sets bot's name and colors
|
||||
*/
|
||||
+(bot_data_t *)name:(integer)r
|
||||
+(bot_data_t *)name:(int)r
|
||||
{
|
||||
if (r < 0 || r >= 32)
|
||||
return nil;
|
||||
|
@ -95,12 +95,12 @@ Sets bot's name and colors
|
|||
|
||||
+(bot_data_t *)randomName
|
||||
{
|
||||
local integer test;
|
||||
local int test;
|
||||
local bot_data_t *h;
|
||||
local entity t;
|
||||
|
||||
while (1) {
|
||||
test = (integer) (32 * random ());
|
||||
test = (int) (32 * random ());
|
||||
h = [Bot name:test];
|
||||
t = find (nil, netname, h.name);
|
||||
if (t == nil)
|
||||
|
@ -132,7 +132,7 @@ fov
|
|||
|
||||
is the entity in the bot's field of view
|
||||
*/
|
||||
-(integer)fov:(entity)targ
|
||||
-(int)fov:(entity)targ
|
||||
{
|
||||
local float g;
|
||||
local vector yawn;
|
||||
|
|
|
@ -42,9 +42,9 @@ this notice in its entirety.
|
|||
|
||||
#include "libfrikbot.h"
|
||||
|
||||
integer bot_move_linker;
|
||||
int bot_move_linker;
|
||||
|
||||
float (integer keys, integer key) key_state =
|
||||
float (int keys, int key) key_state =
|
||||
{
|
||||
return ((keys & key) != 0) ? 1.0 : 0.0;
|
||||
};
|
||||
|
@ -61,7 +61,7 @@ void (vector start, vector mins, vector maxs, vector end, float type,
|
|||
local float anglespeed;
|
||||
local vector view;
|
||||
local vector probe, start;
|
||||
local integer obstructed = 0;
|
||||
local int obstructed = 0;
|
||||
|
||||
movevect.y += (350 * key_state (keys, KEY_MOVERIGHT));
|
||||
movevect.y -= (350 * key_state (keys, KEY_MOVELEFT));
|
||||
|
@ -133,7 +133,7 @@ void (vector start, vector mins, vector maxs, vector end, float type,
|
|||
buttons |= 4;
|
||||
}
|
||||
|
||||
- (integer) canRJ
|
||||
- (int) canRJ
|
||||
{
|
||||
// this returns true of the bot can rocket/superjump/hook
|
||||
// if your mod doesn't have an RL you can just return FALSE all the time
|
||||
|
@ -162,9 +162,9 @@ void (vector start, vector mins, vector maxs, vector end, float type,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
- (integer) recognizePlat: (integer) flag
|
||||
- (int) recognizePlat: (int) flag
|
||||
{
|
||||
local integer ret;
|
||||
local int ret;
|
||||
|
||||
if (!(ent.flags & FL_ONGROUND))
|
||||
return FALSE;
|
||||
|
@ -182,9 +182,9 @@ void (vector start, vector mins, vector maxs, vector end, float type,
|
|||
return ret;
|
||||
}
|
||||
|
||||
-(integer)keysForDir: (vector) sdir
|
||||
-(int)keysForDir: (vector) sdir
|
||||
{
|
||||
local integer outkeys;
|
||||
local int outkeys;
|
||||
local float tang;
|
||||
local vector keydir;
|
||||
|
||||
|
@ -218,7 +218,7 @@ frik_obstructed
|
|||
Bot has hit a ledge or wall that he should
|
||||
manuever around.
|
||||
*/
|
||||
-(void)obstructed: (vector) whichway : (integer) danger
|
||||
-(void)obstructed: (vector) whichway : (int) danger
|
||||
{
|
||||
local float dist;
|
||||
local vector disway, org;
|
||||
|
@ -468,7 +468,7 @@ blah
|
|||
}
|
||||
}
|
||||
|
||||
-(integer)walkmove: (vector) weird
|
||||
-(int)walkmove: (vector) weird
|
||||
{
|
||||
// okay so it's not walkmove
|
||||
// sue me
|
||||
|
|
|
@ -77,11 +77,11 @@ ClientDisconnected(); // FrikBot
|
|||
#include "cmd.h"
|
||||
#include "editor.h"
|
||||
|
||||
integer *bot_way_ref;
|
||||
integer *bot_move_ref;
|
||||
integer *bot_chat_ref;
|
||||
int *bot_way_ref;
|
||||
int *bot_move_ref;
|
||||
int *bot_chat_ref;
|
||||
float *stagger_think_ref;
|
||||
integer *bot_fight_ref;
|
||||
int *bot_fight_ref;
|
||||
|
||||
void ()
|
||||
bot_map_load =
|
||||
|
@ -128,7 +128,7 @@ float waypoint_mode, dump_mode;
|
|||
float direct_route;
|
||||
float sv_gravity;
|
||||
Bot *route_table;
|
||||
integer busy_waypoints;
|
||||
int busy_waypoints;
|
||||
|
||||
float coop = 0; // hack
|
||||
|
||||
|
@ -139,8 +139,8 @@ void(entity e) frik_setspawnparms = #78;
|
|||
entity () SV_AllocClient = #0;
|
||||
void (entity e) SV_FreeClient = #0;
|
||||
void (entity e, string str) SV_SetUserinfo = #0;
|
||||
void (entity e, integer ping) SV_SetPing = #0;
|
||||
void (entity cl, float sec, vector angles, vector move, integer buttons, integer impulse) SV_UserCmd = #0;
|
||||
void (entity e, int ping) SV_SetPing = #0;
|
||||
void (entity cl, float sec, vector angles, vector move, int buttons, int impulse) SV_UserCmd = #0;
|
||||
void (entity cl) SV_Spawn = #0;
|
||||
void () Break = #6;
|
||||
|
||||
|
@ -202,7 +202,7 @@ BotPreFrame =
|
|||
void ()
|
||||
ClientInRankings =
|
||||
{
|
||||
local integer cl_no = ClientNumber (@self);
|
||||
local int cl_no = ClientNumber (@self);
|
||||
|
||||
if (!players[cl_no])
|
||||
players[cl_no] = [[Bot alloc] initFromPlayer:@self];
|
||||
|
@ -211,14 +211,14 @@ ClientInRankings =
|
|||
void ()
|
||||
ClientDisconnected =
|
||||
{
|
||||
local integer cl_no = ClientNumber (@self);
|
||||
local int cl_no = ClientNumber (@self);
|
||||
local Bot *p = nil;
|
||||
|
||||
p = players[cl_no];
|
||||
players[cl_no] = nil;
|
||||
if (p) {
|
||||
local entity e = p.ent;
|
||||
local integer i;
|
||||
local int i;
|
||||
for (i = 0; i < 32; i++) {
|
||||
if (!players[i])
|
||||
continue;
|
||||
|
@ -232,11 +232,11 @@ ClientDisconnected =
|
|||
|
||||
// BotConnect and related functions. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
integer (entity cl)
|
||||
int (entity cl)
|
||||
ClientNumber =
|
||||
{
|
||||
local entity e = nil;
|
||||
local integer f = -1;
|
||||
local int f = -1;
|
||||
|
||||
do {
|
||||
f++;
|
||||
|
@ -247,7 +247,7 @@ ClientNumber =
|
|||
return f;
|
||||
};
|
||||
|
||||
Bot *BotConnect (integer whatbot, integer whatskill)
|
||||
Bot *BotConnect (int whatbot, int whatskill)
|
||||
{
|
||||
local entity cl;
|
||||
local Bot *bot;
|
||||
|
@ -275,7 +275,7 @@ related functions.
|
|||
*/
|
||||
void () BotImpulses =
|
||||
{
|
||||
local integer f;
|
||||
local int f;
|
||||
local string h;
|
||||
local Target *t = @self.@this;
|
||||
|
||||
|
@ -285,7 +285,7 @@ void () BotImpulses =
|
|||
switch (@self.impulse) {
|
||||
case 100:
|
||||
h = infokey (nil, "skill");
|
||||
f = (integer) stof (h);
|
||||
f = (int) stof (h);
|
||||
BotConnect (0, f);
|
||||
break;
|
||||
case 102:
|
||||
|
@ -303,17 +303,17 @@ void () BotImpulses =
|
|||
void ()
|
||||
bot_add_f =
|
||||
{
|
||||
local integer whatbot = 0;
|
||||
local integer skill;
|
||||
local integer c = Cmd_Argc ();
|
||||
local int whatbot = 0;
|
||||
local int skill;
|
||||
local int c = Cmd_Argc ();
|
||||
|
||||
if (c == 1) {
|
||||
skill = (integer) stof (infokey (nil, "skill"));
|
||||
skill = (int) stof (infokey (nil, "skill"));
|
||||
} else if (c == 2) {
|
||||
skill = (integer) stof (Cmd_Argv (1));
|
||||
skill = (int) stof (Cmd_Argv (1));
|
||||
} else {
|
||||
whatbot = (integer) stof (Cmd_Argv (1));
|
||||
skill = (integer) stof (Cmd_Argv (2));
|
||||
whatbot = (int) stof (Cmd_Argv (1));
|
||||
skill = (int) stof (Cmd_Argv (2));
|
||||
}
|
||||
BotConnect (whatbot, skill);
|
||||
};
|
||||
|
@ -363,7 +363,7 @@ signs on to the server.
|
|||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
*/
|
||||
|
||||
void DeveloperLightning (Waypoint *e1, Waypoint *e2, integer flag)
|
||||
void DeveloperLightning (Waypoint *e1, Waypoint *e2, int flag)
|
||||
{
|
||||
// used to show waypoint links for debugging
|
||||
WriteByte (MSG_BROADCAST, 23);
|
||||
|
@ -382,9 +382,9 @@ void DeveloperLightning (Waypoint *e1, Waypoint *e2, integer flag)
|
|||
return [super init];
|
||||
}
|
||||
|
||||
- (id) initWithEntity:(entity) e named:(bot_data_t *)name skill:(integer)skill
|
||||
- (id) initWithEntity:(entity) e named:(bot_data_t *)name skill:(int)skill
|
||||
{
|
||||
local integer cl_no = ClientNumber (e);
|
||||
local int cl_no = ClientNumber (e);
|
||||
local entity uself;
|
||||
|
||||
SV_Spawn (e);
|
||||
|
@ -430,12 +430,12 @@ void DeveloperLightning (Waypoint *e1, Waypoint *e2, integer flag)
|
|||
|
||||
- (id) initFromPlayer: (entity) e
|
||||
{
|
||||
local integer cno;
|
||||
local int cno;
|
||||
|
||||
if (!(self = [super initWithEntity:e]))
|
||||
return nil;
|
||||
|
||||
cno = (integer)e.colormap - 1;
|
||||
cno = (int)e.colormap - 1;
|
||||
b_clientno = cno;
|
||||
ishuman = TRUE;
|
||||
switch_wallhug = time + 1;
|
||||
|
@ -502,7 +502,7 @@ void DeveloperLightning (Waypoint *e1, Waypoint *e2, integer flag)
|
|||
// FIXME: do teams properly
|
||||
}
|
||||
|
||||
- (integer) ishuman
|
||||
- (int) ishuman
|
||||
{
|
||||
return ishuman;
|
||||
}
|
||||
|
@ -518,7 +518,7 @@ void ()
|
|||
BotFrame =
|
||||
{
|
||||
local string h;
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
h = infokey (nil, "bot_options");
|
||||
b_options = stof (h);
|
||||
|
|
|
@ -48,7 +48,7 @@ this notice in its entirety.
|
|||
#include "libfrikbot.h"
|
||||
#include "editor.h"
|
||||
|
||||
integer bot_way_linker;
|
||||
int bot_way_linker;
|
||||
|
||||
@implementation Bot (Way)
|
||||
|
||||
|
@ -107,8 +107,8 @@ an object.
|
|||
// kinda like FindWaypoint, only of this bots route though
|
||||
local Waypoint *t, *best;
|
||||
local float dst, tdst;
|
||||
local integer flag;
|
||||
local integer count, i;
|
||||
local int flag;
|
||||
local int count, i;
|
||||
|
||||
flag = b_clientflag;
|
||||
dst = 100000;
|
||||
|
@ -143,7 +143,7 @@ different bot.
|
|||
-(void)markPath:(Target *)this
|
||||
{
|
||||
local Waypoint *t;
|
||||
local integer flag;
|
||||
local int flag;
|
||||
|
||||
[Waypoint clearMyRoute:self];
|
||||
|
||||
|
@ -189,7 +189,7 @@ Boy it's confusing.
|
|||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
*/
|
||||
|
||||
-(integer)beginRoute
|
||||
-(int)beginRoute
|
||||
{
|
||||
if (busy_waypoints > 0)
|
||||
return FALSE;
|
||||
|
@ -218,7 +218,7 @@ Boy it's confusing.
|
|||
}
|
||||
}
|
||||
|
||||
-(void)getPath:(Target *)this :(integer)direct
|
||||
-(void)getPath:(Target *)this :(int)direct
|
||||
{
|
||||
if (this == nil)
|
||||
return;
|
||||
|
@ -345,7 +345,7 @@ very good all things considered.
|
|||
if (editor) {
|
||||
if (current_way) {
|
||||
local Waypoint *way = current_way;
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (way.links[i]) {
|
||||
|
@ -435,7 +435,7 @@ very good all things considered.
|
|||
}
|
||||
}
|
||||
|
||||
-(integer)canSee:(Target *)targ
|
||||
-(int)canSee:(Target *)targ
|
||||
{
|
||||
local float thruwater = 0, pc1 = 0, pc2 = 0;
|
||||
local vector spot1, org;
|
||||
|
|
|
@ -42,10 +42,10 @@ this notice in its entirety.
|
|||
|
||||
#include "libfrikbot.h"
|
||||
|
||||
integer bot_chat_linker;
|
||||
int bot_chat_linker;
|
||||
|
||||
@static Bot *b_originator;
|
||||
@static integer b_topic;
|
||||
@static int b_topic;
|
||||
/* FBX Topics
|
||||
|
||||
b_originator == self
|
||||
|
@ -105,7 +105,7 @@ b_originator == targ
|
|||
}
|
||||
|
||||
// I didn't like the old code so this is very stripped down
|
||||
-(void)startTopic:(integer)topic
|
||||
-(void)startTopic:(int)topic
|
||||
{
|
||||
if (random() < 0.2) {
|
||||
b_topic = topic;
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
Target *owner;
|
||||
Waypoint *last_way;
|
||||
integer hold_select;
|
||||
int hold_select;
|
||||
Bot *test_bot;
|
||||
integer edit_mode;
|
||||
int edit_mode;
|
||||
}
|
||||
+main_menu;
|
||||
+waypoint_menu;
|
||||
|
@ -59,7 +59,7 @@
|
|||
+confirm;
|
||||
+cancel;
|
||||
|
||||
+(integer)getHoldSelectState;
|
||||
+(int)getHoldSelectState;
|
||||
+(void)toggleHoldSelectState;
|
||||
+(string)getConfirmText;
|
||||
+(Waypoint *)current_way;
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
@interface FlagCluster: Object <FlagMenuItem>
|
||||
{
|
||||
integer mask;
|
||||
int mask;
|
||||
}
|
||||
- initWithMask:(integer)msk;
|
||||
- initWithMask:(int)msk;
|
||||
@end
|
||||
|
||||
@implementation TeleportMenu
|
||||
|
@ -45,7 +45,7 @@
|
|||
"Waypoint #"];
|
||||
}
|
||||
|
||||
-(integer) impulse:(integer)imp
|
||||
-(int) impulse:(int)imp
|
||||
{
|
||||
local Waypoint *way = nil;
|
||||
if ((imp = [super impulse:imp]) == 104) {
|
||||
|
@ -64,7 +64,7 @@
|
|||
@end
|
||||
|
||||
@implementation NoclipFlag
|
||||
-(integer) state
|
||||
-(int) state
|
||||
{
|
||||
return @self.movetype == MOVETYPE_NOCLIP;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@
|
|||
@end
|
||||
|
||||
@implementation GodmodeFlag
|
||||
-(integer) state
|
||||
-(int) state
|
||||
{
|
||||
return !!(@self.flags & FL_GODMODE);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@
|
|||
@end
|
||||
|
||||
@implementation HoldSelectFlag
|
||||
-(integer) state
|
||||
-(int) state
|
||||
{
|
||||
return [EditorState getHoldSelectState];
|
||||
}
|
||||
|
@ -103,7 +103,7 @@
|
|||
@end
|
||||
|
||||
@implementation DynamicFlag
|
||||
-(integer) state
|
||||
-(int) state
|
||||
{
|
||||
return waypoint_mode == WM_EDITOR_DYNAMIC;
|
||||
}
|
||||
|
@ -118,9 +118,9 @@
|
|||
@end
|
||||
|
||||
@implementation DynamicLinkFlag
|
||||
-(integer) state
|
||||
-(int) state
|
||||
{
|
||||
local integer mode = waypoint_mode;
|
||||
local int mode = waypoint_mode;
|
||||
return mode == WM_EDITOR_DYNAMIC || mode == WM_EDITOR_DYNLINK;
|
||||
}
|
||||
|
||||
|
@ -134,14 +134,14 @@
|
|||
@end
|
||||
|
||||
@implementation FlagCluster
|
||||
-(id) initWithMask:(integer)msk
|
||||
-(id) initWithMask:(int)msk
|
||||
{
|
||||
self = [super init];
|
||||
mask = msk;
|
||||
return self;
|
||||
}
|
||||
|
||||
-(integer) state
|
||||
-(int) state
|
||||
{
|
||||
local Waypoint *way = [EditorState current_way];
|
||||
if (!way)
|
||||
|
@ -603,7 +603,7 @@
|
|||
{
|
||||
local EditorState *editor = ((Target *) @self.@this).editor;
|
||||
local Waypoint *way = [editor current_way];
|
||||
local integer i;
|
||||
local int i;
|
||||
if (!way)
|
||||
return self;
|
||||
sprint (@self, PRINT_HIGH,
|
||||
|
@ -706,7 +706,7 @@
|
|||
+add_test_bot
|
||||
{
|
||||
local EditorState *editor = ((Target *) @self.@this).editor;
|
||||
local integer f;
|
||||
local int f;
|
||||
local string h;
|
||||
|
||||
if (editor.test_bot) {
|
||||
|
@ -714,7 +714,7 @@
|
|||
return self;
|
||||
}
|
||||
h = infokey (nil, "skill");
|
||||
f = (integer) stof (h);
|
||||
f = (int) stof (h);
|
||||
editor.test_bot = BotConnect (0, f);
|
||||
return self;
|
||||
}
|
||||
|
@ -860,7 +860,7 @@
|
|||
}
|
||||
|
||||
|
||||
+(integer)getHoldSelectState
|
||||
+(int)getHoldSelectState
|
||||
{
|
||||
local EditorState *editor = ((Target *) @self.@this).editor;
|
||||
return editor.hold_select != 0;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
@end
|
||||
|
||||
@protocol FlagMenuItem
|
||||
-(integer) state;
|
||||
-(int) state;
|
||||
-(void) toggle;
|
||||
@end
|
||||
|
||||
|
@ -37,13 +37,13 @@
|
|||
string text;
|
||||
}
|
||||
- (id) initWithText:(string)txt;
|
||||
- (integer) impulse:(integer)imp;
|
||||
- (int) impulse:(int)imp;
|
||||
- (string) text;
|
||||
@end
|
||||
|
||||
@interface ImpulseValueMenu: ImpulseMenu
|
||||
{
|
||||
integer value;
|
||||
int value;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
- (string) text
|
||||
{
|
||||
local integer state = (integer)[flag state];
|
||||
local int state = (int)[flag state];
|
||||
return sprintf ("[%c] %s", state ? '#' : ' ', [super text]);
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (integer) impulse: (integer) imp
|
||||
- (int) impulse: (int) imp
|
||||
{
|
||||
return imp;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@
|
|||
@end
|
||||
|
||||
@implementation ImpulseValueMenu
|
||||
- (integer) impulse: (integer) imp
|
||||
- (int) impulse: (int) imp
|
||||
{
|
||||
if (imp < 1 || imp > 10)
|
||||
return imp;
|
||||
|
@ -94,14 +94,14 @@
|
|||
value = 0;
|
||||
}
|
||||
|
||||
- (integer) value
|
||||
- (int) value
|
||||
{
|
||||
return value;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation ImpulseListMenu
|
||||
- (integer) impulse: (integer) imp
|
||||
- (int) impulse: (int) imp
|
||||
{
|
||||
if (imp < 1 || imp > 10)
|
||||
return imp;
|
||||
|
@ -114,9 +114,9 @@
|
|||
{
|
||||
local string str = text;
|
||||
local string s;
|
||||
local integer i;
|
||||
local int i;
|
||||
local string is[10];
|
||||
local integer max_len = 0, len;
|
||||
local int max_len = 0, len;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!items[i])
|
||||
|
@ -141,7 +141,7 @@
|
|||
|
||||
- (void) addItem:(MenuItem *) item
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!items[i]) {
|
||||
|
|
|
@ -16,18 +16,18 @@ typedef struct bot_data_t bot_data_t;
|
|||
{
|
||||
@public
|
||||
Waypoint *current_way;
|
||||
integer hold_select;
|
||||
int hold_select;
|
||||
Target *_last;
|
||||
EditorState *editor;
|
||||
}
|
||||
+(Target *)forEntity:(entity)e;
|
||||
-(vector)realorigin;
|
||||
-(vector)origin;
|
||||
-(integer)canSee:(Target *)targ ignoring:(entity)ignore;
|
||||
-(int)canSee:(Target *)targ ignoring:(entity)ignore;
|
||||
-(void)setOrigin:(vector) org;
|
||||
-(integer)recognizePlat:(integer)flag;
|
||||
-(integer)ishuman;
|
||||
-(integer)priority:(Bot *)bot;
|
||||
-(int)recognizePlat:(int)flag;
|
||||
-(int)ishuman;
|
||||
-(int)priority:(Bot *)bot;
|
||||
-(Waypoint *)findWaypoint:(Waypoint *)start;
|
||||
-(float)searchTime;
|
||||
-(void)setSearchTime:(float)st;
|
||||
|
@ -38,13 +38,13 @@ typedef struct bot_data_t bot_data_t;
|
|||
{
|
||||
@public
|
||||
Waypoint *links[4];
|
||||
integer flags;
|
||||
int flags;
|
||||
vector origin;
|
||||
|
||||
integer is_temp;
|
||||
int is_temp;
|
||||
|
||||
integer bot_bits;
|
||||
integer busy; //???
|
||||
int bot_bits;
|
||||
int busy; //???
|
||||
float distance;
|
||||
Waypoint *enemy;
|
||||
float search_time;
|
||||
|
@ -53,7 +53,7 @@ typedef struct bot_data_t bot_data_t;
|
|||
}
|
||||
+(void)loadFile:(string)path;
|
||||
+(void)clearAll;
|
||||
+(Waypoint *)waypointForNum:(integer)num;
|
||||
+(Waypoint *)waypointForNum:(int)num;
|
||||
+(void)fixWaypoints;
|
||||
+(PLItem *)plist;
|
||||
+(void)check:(Target *)ent;
|
||||
|
@ -67,17 +67,17 @@ typedef struct bot_data_t bot_data_t;
|
|||
-(void)deselect;
|
||||
-(void)select;
|
||||
|
||||
-(integer)id;
|
||||
-(int)id;
|
||||
-(id)init;
|
||||
-(id)initAt:(vector)org;
|
||||
-(id)initFromEntity:(entity)ent;
|
||||
|
||||
-(integer)isLinkedTo:(Waypoint *)way;
|
||||
-(integer)linkWay:(Waypoint *)way;
|
||||
-(integer)teleLinkWay:(Waypoint *)way;
|
||||
-(int)isLinkedTo:(Waypoint *)way;
|
||||
-(int)linkWay:(Waypoint *)way;
|
||||
-(int)teleLinkWay:(Waypoint *)way;
|
||||
-(void)unlinkWay:(Waypoint *)way;
|
||||
|
||||
-(void)followLink:(Waypoint *)e2 :(integer)bBit;
|
||||
-(void)followLink:(Waypoint *)e2 :(int)bBit;
|
||||
-(void)waypointThink;
|
||||
|
||||
-(void)clearLinks;
|
||||
|
@ -92,32 +92,32 @@ typedef struct bot_data_t bot_data_t;
|
|||
@interface Bot: Target
|
||||
{
|
||||
@public
|
||||
integer keys;
|
||||
integer buttons;
|
||||
integer impulse;
|
||||
int keys;
|
||||
int buttons;
|
||||
int impulse;
|
||||
vector b_angle;
|
||||
vector mouse_emu;
|
||||
|
||||
integer wallhug;
|
||||
integer ishuman;
|
||||
int wallhug;
|
||||
int ishuman;
|
||||
float b_frags; // for detecting score changes
|
||||
integer b_clientno;
|
||||
integer b_clientflag;
|
||||
int b_clientno;
|
||||
int b_clientflag;
|
||||
float b_shirt;
|
||||
float b_pants;
|
||||
float ai_time;
|
||||
float b_sound;
|
||||
float missile_speed;
|
||||
float portal_time;
|
||||
integer b_skill;
|
||||
int b_skill;
|
||||
float switch_wallhug;
|
||||
integer b_aiflags;
|
||||
integer b_num;
|
||||
int b_aiflags;
|
||||
int b_num;
|
||||
float b_chattime;
|
||||
float b_entertime;
|
||||
integer route_failed;
|
||||
integer dyn_flags;
|
||||
integer dyn_plat;
|
||||
int route_failed;
|
||||
int dyn_flags;
|
||||
int dyn_plat;
|
||||
float dyn_time;
|
||||
Waypoint *temp_way;
|
||||
Waypoint *last_way;
|
||||
|
@ -132,7 +132,7 @@ typedef struct bot_data_t bot_data_t;
|
|||
float portal_time;
|
||||
}
|
||||
- (id) init;
|
||||
- (id) initWithEntity: (entity) e named:(bot_data_t *)name skill:(integer)skill;
|
||||
- (id) initWithEntity: (entity) e named:(bot_data_t *)name skill:(int)skill;
|
||||
- (id) initFromPlayer: (entity) e;
|
||||
- (void) preThink;
|
||||
- (void) postThink;
|
||||
|
@ -144,9 +144,9 @@ typedef struct bot_data_t bot_data_t;
|
|||
@end
|
||||
|
||||
@interface Bot (Misc)
|
||||
+(bot_data_t *)name:(integer)r;
|
||||
+(bot_data_t *)name:(int)r;
|
||||
+(bot_data_t *)randomName;
|
||||
-(integer)fov:(entity)targ;
|
||||
-(int)fov:(entity)targ;
|
||||
|
||||
+(void)kick;
|
||||
-(void)add;
|
||||
|
@ -155,30 +155,30 @@ typedef struct bot_data_t bot_data_t;
|
|||
@interface Bot (Move)
|
||||
- (void)sendMove;
|
||||
- (void)jump;
|
||||
- (integer)canRJ;
|
||||
- (integer)recognizePlat: (integer) flag;
|
||||
- (integer)keysForDir: (vector) sdir;
|
||||
- (void)obstructed: (vector) whichway : (integer) danger;
|
||||
- (int)canRJ;
|
||||
- (int)recognizePlat: (int) flag;
|
||||
- (int)keysForDir: (vector) sdir;
|
||||
- (void)obstructed: (vector) whichway : (int) danger;
|
||||
- (void)obstacles;
|
||||
- (void)dodgeObstruction;
|
||||
- (void)movetogoal;
|
||||
- (integer)walkmove: (vector) weird;
|
||||
- (int)walkmove: (vector) weird;
|
||||
- (void)roam;
|
||||
@end
|
||||
|
||||
@interface Bot (AI)
|
||||
-(integer)targetOnstack:(Target *)scot;
|
||||
-(int)targetOnstack:(Target *)scot;
|
||||
-(void)targetAdd:(Target *)e;
|
||||
-(void)targetDrop:(Target *)e;
|
||||
-(void)targetClearAll;
|
||||
-(void)lost:(Target *)targ :(integer)success;
|
||||
-(void)lost:(Target *)targ :(int)success;
|
||||
-(void)checkLost:(Target *)targ;
|
||||
-(void)handleAI;
|
||||
-(void)path;
|
||||
-(void)lookForCrap:(integer)scope;
|
||||
-(void)lookForCrap:(int)scope;
|
||||
-(void)angleSet;
|
||||
-(void)AI;
|
||||
-(integer)priorityForThing:(Target *)thing;
|
||||
-(int)priorityForThing:(Target *)thing;
|
||||
@end
|
||||
|
||||
@interface Bot (Fight)
|
||||
|
@ -194,16 +194,16 @@ typedef struct bot_data_t bot_data_t;
|
|||
-(entity)findThing:(string)s;
|
||||
-(Waypoint *)findRoute:(Waypoint *)lastone;
|
||||
-(void)markPath:(Target *)this;
|
||||
-(void)getPath:(Target *)this :(integer)direct;
|
||||
-(integer)beginRoute;
|
||||
-(void)getPath:(Target *)this :(int)direct;
|
||||
-(int)beginRoute;
|
||||
-(void)spawnTempWaypoint:(vector)org;
|
||||
-(void)dynamicWaypoint;
|
||||
|
||||
-(integer)canSee:(Target *)targ;
|
||||
-(int)canSee:(Target *)targ;
|
||||
@end
|
||||
|
||||
@interface Bot (Chat)
|
||||
-(void)startTopic:(integer)topic;
|
||||
-(void)startTopic:(int)topic;
|
||||
-(void)say:(string)msg;
|
||||
-(void)say2:(string)msg;
|
||||
-(void)sayTeam:(string)msg;
|
||||
|
@ -294,21 +294,21 @@ typedef struct bot_data_t bot_data_t;
|
|||
@extern float direct_route;
|
||||
@extern float sv_gravity;
|
||||
@extern Bot *route_table;
|
||||
@extern integer busy_waypoints;
|
||||
@extern int busy_waypoints;
|
||||
|
||||
@extern float coop;
|
||||
|
||||
// -------ProtoTypes------
|
||||
// external, in main code
|
||||
@extern Bot *BotConnect (integer whatbot, integer whatskill);
|
||||
@extern Bot *BotConnect (int whatbot, int whatskill);
|
||||
@extern void() ClientConnect;
|
||||
@extern void() ClientDisconnect;
|
||||
@extern void() SetNewParms;
|
||||
|
||||
// rankings
|
||||
@extern integer (entity e) ClientNumber;
|
||||
@extern int (entity e) ClientNumber;
|
||||
|
||||
@extern void(vector org, vector bit1, integer bit4, integer flargs) make_way;
|
||||
@extern void(vector org, vector bit1, int bit4, int flargs) make_way;
|
||||
|
||||
@extern void () map_dm1;
|
||||
@extern void () map_dm2;
|
||||
|
@ -324,20 +324,20 @@ typedef struct bot_data_t bot_data_t;
|
|||
@extern vector(entity ent) realorigin;
|
||||
@extern float(float v) frik_anglemod;
|
||||
|
||||
@extern void DeveloperLightning(Waypoint *e1, Waypoint *e2, integer flag);
|
||||
@extern void DeveloperLightning(Waypoint *e1, Waypoint *e2, int flag);
|
||||
|
||||
/*
|
||||
angles is pitch yaw roll
|
||||
move is forward right up
|
||||
*/
|
||||
@extern void (entity cl, float sec, vector angles, vector move, integer buttons, integer impulse) SV_UserCmd;
|
||||
@extern void (entity cl, float sec, vector angles, vector move, int buttons, int impulse) SV_UserCmd;
|
||||
@extern void () Break;
|
||||
@extern string (integer i) itos;
|
||||
@extern string (int i) itos;
|
||||
|
||||
@extern integer bot_way_linker;
|
||||
@extern integer bot_move_linker;
|
||||
@extern integer bot_chat_linker;
|
||||
@extern int bot_way_linker;
|
||||
@extern int bot_move_linker;
|
||||
@extern int bot_chat_linker;
|
||||
@extern float stagger_think;
|
||||
@extern integer bot_fight_linker;
|
||||
@extern int bot_fight_linker;
|
||||
|
||||
#include "defs.h"
|
||||
|
|
|
@ -60,7 +60,7 @@ struct target_s {
|
|||
return nil;//FIXME
|
||||
};
|
||||
|
||||
@static integer target_compare (void *e1, void*e2, void *unused)
|
||||
@static int target_compare (void *e1, void*e2, void *unused)
|
||||
{
|
||||
local Target *t1 = e1;
|
||||
local Target *t2 = e2;
|
||||
|
@ -104,7 +104,7 @@ struct target_s {
|
|||
return ent.origin;
|
||||
}
|
||||
|
||||
-(integer)canSee:(Target *)targ ignoring:(entity)ignore
|
||||
-(int)canSee:(Target *)targ ignoring:(entity)ignore
|
||||
{
|
||||
local vector spot1, spot2;
|
||||
|
||||
|
@ -126,7 +126,7 @@ struct target_s {
|
|||
{
|
||||
}
|
||||
|
||||
- (integer) recognizePlat: (integer) flag
|
||||
- (int) recognizePlat: (int) flag
|
||||
{
|
||||
local vector org = [self origin];
|
||||
traceline (org, org - '0 0 64', TRUE, ent);
|
||||
|
@ -136,12 +136,12 @@ struct target_s {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
-(integer)ishuman
|
||||
-(int)ishuman
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-(integer)priority:(Bot *)bot
|
||||
-(int)priority:(Bot *)bot
|
||||
{
|
||||
if ((ent.flags & FL_ITEM) && ent.model && ent.search_time < time) {
|
||||
// ugly hack
|
||||
|
@ -209,8 +209,8 @@ Finds the closest, fisible, waypoint to e
|
|||
local Waypoint *best, *t;
|
||||
local float dst, tdst;
|
||||
local vector org;
|
||||
local integer count, i;
|
||||
local integer ishuman = [self ishuman];
|
||||
local int count, i;
|
||||
local int ishuman = [self ishuman];
|
||||
|
||||
org = [self realorigin];
|
||||
|
||||
|
|
|
@ -67,9 +67,9 @@ Array *waypoint_array;
|
|||
|
||||
@implementation Waypoint
|
||||
|
||||
-(integer)id
|
||||
-(int)id
|
||||
{
|
||||
integer index = [waypoint_array indexOfObject:self];
|
||||
int index = [waypoint_array indexOfObject:self];
|
||||
if (index != NotFound)
|
||||
return index + 1;
|
||||
return 0;
|
||||
|
@ -93,7 +93,7 @@ Array *waypoint_array;
|
|||
return self;
|
||||
}
|
||||
|
||||
-(id)initAt:(vector)org linkedTo:(integer*)link flags:(integer)flag
|
||||
-(id)initAt:(vector)org linkedTo:(int*)link flags:(int)flag
|
||||
{
|
||||
self = [self initAt:org];
|
||||
links[0] = (Waypoint *) link[0];
|
||||
|
@ -140,9 +140,9 @@ Array *waypoint_array;
|
|||
links[0] = links[1] = links[2] = links[3] = nil;
|
||||
}
|
||||
|
||||
-(integer)isLinkedTo:(Waypoint *)way
|
||||
-(int)isLinkedTo:(Waypoint *)way
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
if (way == self || !way || !self)
|
||||
return 0;
|
||||
|
@ -157,9 +157,9 @@ Array *waypoint_array;
|
|||
return 0;
|
||||
}
|
||||
|
||||
-(integer)linkWay:(Waypoint *)way
|
||||
-(int)linkWay:(Waypoint *)way
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
if (self == way || !self || !way)
|
||||
return 0;
|
||||
|
@ -176,9 +176,9 @@ Array *waypoint_array;
|
|||
}
|
||||
|
||||
// Link Ways part 2, used only for teleporters
|
||||
-(integer)teleLinkWay:(Waypoint *)way
|
||||
-(int)teleLinkWay:(Waypoint *)way
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
if (self == way || !self || !way)
|
||||
return 0;
|
||||
|
@ -197,7 +197,7 @@ Array *waypoint_array;
|
|||
|
||||
-(void)unlinkWay:(Waypoint *)way
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
if (self == way || !self || !way)
|
||||
return;
|
||||
|
@ -225,7 +225,7 @@ Waypoint Loading from file
|
|||
local QFile file;
|
||||
local PLItem *plist;
|
||||
local string plist_data;
|
||||
local integer i, count;
|
||||
local int i, count;
|
||||
|
||||
file = QFS_OpenFile (path);
|
||||
if (!file) {
|
||||
|
@ -249,9 +249,9 @@ Waypoint Loading from file
|
|||
//FIXME compiler/vm "bug" makes passing pointers to locals dangerous
|
||||
|
||||
s = (PLString *) [way getObjectForKey:"flags"];
|
||||
local integer flags = stoi ([s string]);
|
||||
local int flags = stoi ([s string]);
|
||||
|
||||
@static integer link[4];
|
||||
@static int link[4];
|
||||
s = (PLString *) [links getObjectAtIndex:0];
|
||||
link[0] = stoi ([s string]);
|
||||
s = (PLString *) [links getObjectAtIndex:1];
|
||||
|
@ -274,7 +274,7 @@ Waypoint Loading from file
|
|||
waypoint_init ();
|
||||
}
|
||||
|
||||
+(Waypoint *)waypointForNum:(integer)num
|
||||
+(Waypoint *)waypointForNum:(int)num
|
||||
{
|
||||
if (!num)
|
||||
return nil;
|
||||
|
@ -283,10 +283,10 @@ Waypoint Loading from file
|
|||
|
||||
-(void)fix
|
||||
{
|
||||
local integer i, tmp;
|
||||
local int i, tmp;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
tmp = (integer)links[i];
|
||||
tmp = (int)links[i];
|
||||
links[i] = [Waypoint waypointForNum:tmp];
|
||||
}
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ Waypoint Loading from file
|
|||
// you don't want this. it's harsh. overflows normal servers and clients
|
||||
-(void) debug
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
local vector dir, dest, pos;
|
||||
|
||||
@self = spawn ();
|
||||
|
@ -331,7 +331,7 @@ Waypoint Loading from file
|
|||
{
|
||||
local PLDictionary *way = (PLDictionary *) [PLItem newDictionary];
|
||||
local PLArray *l = (PLArray *) [PLItem newArray];
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
[way addKey:"origin" value:[PLItem newString:sprintf ("%g %g %g",
|
||||
origin.x,
|
||||
|
@ -358,7 +358,7 @@ Waypoint Loading from file
|
|||
|
||||
-(void) checkWay:(Target *)ent
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
for (i = 0; i < 4; i++)
|
||||
if (links[i])
|
||||
break;
|
||||
|
@ -383,7 +383,7 @@ Waypoint Loading from file
|
|||
{
|
||||
local vector dif;
|
||||
local float dist;
|
||||
local integer i, count;
|
||||
local int i, count;
|
||||
local Waypoint *way = nil, *w;
|
||||
|
||||
rad = rad * rad; // radius squared
|
||||
|
@ -491,7 +491,7 @@ tripping the runaway loop counter
|
|||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
*/
|
||||
|
||||
-(void)followLink:(Waypoint *)e2 :(integer)bBit
|
||||
-(void)followLink:(Waypoint *)e2 :(int)bBit
|
||||
{
|
||||
local float dist;
|
||||
|
||||
|
@ -522,7 +522,7 @@ tripping the runaway loop counter
|
|||
|
||||
-(void)waypointThink
|
||||
{
|
||||
local integer i;
|
||||
local int i;
|
||||
|
||||
if (distance == -1)
|
||||
return;
|
||||
|
@ -573,7 +573,7 @@ tripping the runaway loop counter
|
|||
return self;
|
||||
}
|
||||
|
||||
-(integer)priority:(Bot *)bot
|
||||
-(int)priority:(Bot *)bot
|
||||
{
|
||||
if (flags & AI_SNIPER)
|
||||
return 30;
|
||||
|
@ -615,20 +615,20 @@ void() waypoint =
|
|||
|
||||
/* create a new waypoint using frikbot style info
|
||||
org origin of the waypoint
|
||||
bit1 first 3 links (cast to integer)
|
||||
bit1 first 3 links (cast to int)
|
||||
bit4 fourth link
|
||||
flargs various flags
|
||||
|
||||
links are 1 based with 0 being no link and 1 being the first waypoint
|
||||
created, 2 the second and so on.
|
||||
*/
|
||||
void(vector org, vector bit1, integer bit4, integer flargs) make_way =
|
||||
void(vector org, vector bit1, int bit4, int flargs) make_way =
|
||||
{
|
||||
local Waypoint *y = [[Waypoint alloc] initAt:org];
|
||||
waypoint_mode = WM_LOADED;
|
||||
y.flags = flargs;
|
||||
y.links[0] = (Waypoint *) (integer) bit1.x;
|
||||
y.links[1] = (Waypoint *) (integer) bit1.y;
|
||||
y.links[2] = (Waypoint *) (integer) bit1.z;
|
||||
y.links[3] = (Waypoint *) (integer) bit4;
|
||||
y.links[0] = (Waypoint *) (int) bit1.x;
|
||||
y.links[1] = (Waypoint *) (int) bit1.y;
|
||||
y.links[2] = (Waypoint *) (int) bit1.z;
|
||||
y.links[3] = (Waypoint *) (int) bit4;
|
||||
};
|
||||
|
|
|
@ -428,7 +428,7 @@ float rj;
|
|||
|
||||
.float speed;
|
||||
|
||||
.integer lefty;
|
||||
.int lefty;
|
||||
|
||||
.float search_time;
|
||||
.float attack_state;
|
||||
|
|
|
@ -175,7 +175,7 @@ void() SUB_CalcAngleMoveDone =
|
|||
|
||||
void() DelayThink =
|
||||
{
|
||||
local integer rem = self.killtarget != self.targetname;
|
||||
local int rem = self.killtarget != self.targetname;
|
||||
activator = self.enemy;
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -524,7 +524,7 @@ void() trigger_onlyregistered_touch =
|
|||
self.attack_finished = time + 2;
|
||||
if (cvar("registered"))
|
||||
{
|
||||
local integer rem = self.targetname != self.killtarget;
|
||||
local int rem = self.targetname != self.killtarget;
|
||||
self.message = "";
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -134,7 +134,7 @@ float(float a) CamReAngle =
|
|||
|
||||
// point visibility test
|
||||
|
||||
integer(vector vec) CamVisible =
|
||||
int(vector vec) CamVisible =
|
||||
{
|
||||
traceline(self.origin,vec,TRUE,self);
|
||||
return ((trace_fraction == 1) && !((trace_inopen && trace_inwater)));
|
||||
|
@ -143,7 +143,7 @@ integer(vector vec) CamVisible =
|
|||
// entity visibility test
|
||||
// suited for players and player size bots; may vary for various classnames
|
||||
|
||||
integer(entity ent) CamVisibleEnt =
|
||||
int(entity ent) CamVisibleEnt =
|
||||
{
|
||||
local vector vec;
|
||||
|
||||
|
@ -215,7 +215,7 @@ float(float d, float a) CamHurry =
|
|||
vector(float s, float v, float a) CamSmooth =
|
||||
{
|
||||
local float dt,t1,t2,v2,as,sv2;
|
||||
local integer b;
|
||||
local int b;
|
||||
local vector vec;
|
||||
|
||||
s = CamReAngle(s);
|
||||
|
|
|
@ -184,7 +184,7 @@ void() SUB_CalcAngleMoveDone =
|
|||
|
||||
void() DelayThink =
|
||||
{
|
||||
local integer rem = self.killtarget != self.targetname;
|
||||
local int rem = self.killtarget != self.targetname;
|
||||
activator = self.enemy;
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -520,7 +520,7 @@ void() trigger_onlyregistered_touch =
|
|||
self.attack_finished = time + 2;
|
||||
if (cvar("registered"))
|
||||
{
|
||||
local integer rem = self.targetname != self.killtarget;
|
||||
local int rem = self.targetname != self.killtarget;
|
||||
self.message = "";
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -153,7 +153,7 @@ void() SUB_CalcAngleMoveDone =
|
|||
//=============================================================================
|
||||
void() DelayThink =
|
||||
{
|
||||
local integer rem = self.killtarget != self.targetname;
|
||||
local int rem = self.killtarget != self.targetname;
|
||||
activator = self.enemy;
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -441,7 +441,7 @@ void() trigger_onlyregistered_touch =
|
|||
self.attack_finished = time + 2;
|
||||
if (cvar("registered"))
|
||||
{
|
||||
local integer rem = self.targetname != self.killtarget;
|
||||
local int rem = self.targetname != self.killtarget;
|
||||
self.message = "";
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -445,7 +445,7 @@ float skill;
|
|||
|
||||
.float speed;
|
||||
|
||||
.integer lefty;
|
||||
.int lefty;
|
||||
|
||||
.float search_time;
|
||||
.float attack_state;
|
||||
|
|
|
@ -184,7 +184,7 @@ void() SUB_CalcAngleMoveDone =
|
|||
|
||||
void() DelayThink =
|
||||
{
|
||||
local integer rem = self.killtarget != self.targetname;
|
||||
local int rem = self.killtarget != self.targetname;
|
||||
activator = self.enemy;
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -477,7 +477,7 @@ void() trigger_onlyregistered_touch =
|
|||
|
||||
self.attack_finished = time + 2;
|
||||
if (cvar("registered")) {
|
||||
local integer rem = self.targetname != self.killtarget;
|
||||
local int rem = self.targetname != self.killtarget;
|
||||
self.message = "";
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -173,7 +173,7 @@ SUB_CalcAngleMoveDone =
|
|||
void ()
|
||||
DelayThink =
|
||||
{
|
||||
local integer rem = self.killtarget != self.targetname;
|
||||
local int rem = self.killtarget != self.targetname;
|
||||
activator = self.enemy;
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
|
@ -480,7 +480,7 @@ trigger_onlyregistered_touch =
|
|||
|
||||
self.attack_finished = time + 2;
|
||||
if (cvar ("registered")) {
|
||||
local integer rem = self.targetname != self.killtarget;
|
||||
local int rem = self.targetname != self.killtarget;
|
||||
self.message = "";
|
||||
SUB_UseTargets ();
|
||||
if (rem)
|
||||
|
|
Loading…
Reference in a new issue