Update for the int changes.

This commit is contained in:
Bill Currie 2011-03-30 10:38:44 +09:00
parent 7d1f271764
commit 6d921e4f75
30 changed files with 208 additions and 208 deletions

View file

@ -1315,7 +1315,7 @@ void(entity targ, entity attacker) ClientObituary =
local float attackerteam; local float attackerteam;
local float targteam; local float targteam;
#endif #endif
local integer gibbed = (targ.health < -40); local int gibbed = (targ.health < -40);
#ifdef QUAKEWORLD #ifdef QUAKEWORLD
attackerteam = INFOKEY (attacker, "team"); attackerteam = INFOKEY (attacker, "team");

View file

@ -537,7 +537,7 @@ void(vector org) launch_shrapnel =
//and now the bomb code... //and now the bomb code...
void() ShrapnelExplode = void() ShrapnelExplode =
{ {
local integer i; local int i;
local vector direction; local vector direction;

View file

@ -11,7 +11,7 @@
#define SPAWN_METAL 4 #define SPAWN_METAL 4
#define SPAWN_WOOD 8 #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 = vector (float dm, vector dir) VelocityForRubble =
{ {

View file

@ -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) if (scot == nil)
return FALSE; 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) if (!targ)
return; return;
@ -525,9 +525,9 @@ the bot finds things it wants to kill/grab.
// 50 - 90 bot will hunt these as vital items // 50 - 90 bot will hunt these as vital items
// *!* Make sure you add code to checkLost to remove the target *!* // *!* 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) if (ent.health <= 0)
return 0; return 0;
@ -551,9 +551,9 @@ the bot finds things it wants to kill/grab.
return p; 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. // This is the most executed function in the bot. Careful what you do here.
if (pointcontents ([thing origin]) < -3) if (pointcontents ([thing origin]) < -3)
return 0; return 0;
@ -565,16 +565,16 @@ the bot finds things it wants to kill/grab.
if (thing.current_way.distance == -1) if (thing.current_way.distance == -1)
return 0; return 0;
else else
p += (integer) ((13000 - thing.current_way.distance) * 0.05); p += (int) ((13000 - thing.current_way.distance) * 0.05);
} }
return p; return p;
} }
-(void)lookForCrap:(integer)scope -(void)lookForCrap:(int)scope
{ {
local Target *foe, *best = nil; local Target *foe, *best = nil;
local Waypoint *way; local Waypoint *way;
local integer thatp, bestp; local int thatp, bestp;
local float radius; local float radius;
if (scope == 1) 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 // playerstatus bars, and the mod probably already compensated for that
if (ent.health < 1) { if (ent.health < 1) {
buttons = (integer) (random() * 2); buttons = (int) (random() * 2);
keys = 0; keys = 0;
b_aiflags = 0; b_aiflags = 0;
[Waypoint clearMyRoute:self]; [Waypoint clearMyRoute:self];

View file

@ -42,7 +42,7 @@ this notice in its entirety.
#include "libfrikbot.h" #include "libfrikbot.h"
integer bot_fight_linker; int bot_fight_linker;
/* /*
weapon_range weapon_range
@ -51,7 +51,7 @@ weapon_range
.y minimum range bot can be to be effective (rl/gl) (move away) .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) .z maximum range bot can be to be effective (lg/axe) (move in)
*/ */
vector (integer wep) vector (int wep)
weapon_range = weapon_range =
{ {
switch (wep) { switch (wep) {
@ -201,7 +201,7 @@ weapon_range =
} }
} }
} else { } else {
local integer i = 0; local int i = 0;
local Bot *foe; local Bot *foe;
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
if (!(foe = players[i])) continue; if (!(foe = players[i])) continue;
@ -230,10 +230,10 @@ Pick a weapon based on range / ammo
*/ */
-(void)weaponSwitch:(float)brange -(void)weaponSwitch:(float)brange
{ {
local integer it, flag = 0, pulse = 0; local int it, flag = 0, pulse = 0;
local vector v; local vector v;
it = (integer) ent.items & 127; it = (int) ent.items & 127;
while (it) { while (it) {
if ((ent.ammo_rockets >= 1) && (it & IT_ROCKET_LAUNCHER)) { if ((ent.ammo_rockets >= 1) && (it & IT_ROCKET_LAUNCHER)) {
@ -322,7 +322,7 @@ attacking an enemy.
// decide if I should shoot // decide if I should shoot
foedist = vlen (org - ent.origin); foedist = vlen (org - ent.origin);
v = weapon_range ((integer)ent.weapon); v = weapon_range ((int)ent.weapon);
if (foedist > v.y && foedist < v.z) { if (foedist > v.y && foedist < v.z) {
traceline (ent.origin + ent.view_ofs, traceline (ent.origin + ent.view_ofs,
ent.origin + ent.view_ofs + v_forward * v.z, FALSE, ent); ent.origin + ent.view_ofs + v_forward * v.z, FALSE, ent);

View file

@ -86,7 +86,7 @@ BotName
Sets bot's name and colors Sets bot's name and colors
*/ */
+(bot_data_t *)name:(integer)r +(bot_data_t *)name:(int)r
{ {
if (r < 0 || r >= 32) if (r < 0 || r >= 32)
return nil; return nil;
@ -95,12 +95,12 @@ Sets bot's name and colors
+(bot_data_t *)randomName +(bot_data_t *)randomName
{ {
local integer test; local int test;
local bot_data_t *h; local bot_data_t *h;
local entity t; local entity t;
while (1) { while (1) {
test = (integer) (32 * random ()); test = (int) (32 * random ());
h = [Bot name:test]; h = [Bot name:test];
t = find (nil, netname, h.name); t = find (nil, netname, h.name);
if (t == nil) if (t == nil)
@ -132,7 +132,7 @@ fov
is the entity in the bot's field of view is the entity in the bot's field of view
*/ */
-(integer)fov:(entity)targ -(int)fov:(entity)targ
{ {
local float g; local float g;
local vector yawn; local vector yawn;

View file

@ -42,9 +42,9 @@ this notice in its entirety.
#include "libfrikbot.h" #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; 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 float anglespeed;
local vector view; local vector view;
local vector probe, start; 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_MOVERIGHT));
movevect.y -= (350 * key_state (keys, KEY_MOVELEFT)); 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; buttons |= 4;
} }
- (integer) canRJ - (int) canRJ
{ {
// this returns true of the bot can rocket/superjump/hook // 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 // 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; return FALSE;
} }
- (integer) recognizePlat: (integer) flag - (int) recognizePlat: (int) flag
{ {
local integer ret; local int ret;
if (!(ent.flags & FL_ONGROUND)) if (!(ent.flags & FL_ONGROUND))
return FALSE; return FALSE;
@ -182,9 +182,9 @@ void (vector start, vector mins, vector maxs, vector end, float type,
return ret; return ret;
} }
-(integer)keysForDir: (vector) sdir -(int)keysForDir: (vector) sdir
{ {
local integer outkeys; local int outkeys;
local float tang; local float tang;
local vector keydir; local vector keydir;
@ -218,7 +218,7 @@ frik_obstructed
Bot has hit a ledge or wall that he should Bot has hit a ledge or wall that he should
manuever around. manuever around.
*/ */
-(void)obstructed: (vector) whichway : (integer) danger -(void)obstructed: (vector) whichway : (int) danger
{ {
local float dist; local float dist;
local vector disway, org; local vector disway, org;
@ -468,7 +468,7 @@ blah
} }
} }
-(integer)walkmove: (vector) weird -(int)walkmove: (vector) weird
{ {
// okay so it's not walkmove // okay so it's not walkmove
// sue me // sue me

View file

@ -77,11 +77,11 @@ ClientDisconnected(); // FrikBot
#include "cmd.h" #include "cmd.h"
#include "editor.h" #include "editor.h"
integer *bot_way_ref; int *bot_way_ref;
integer *bot_move_ref; int *bot_move_ref;
integer *bot_chat_ref; int *bot_chat_ref;
float *stagger_think_ref; float *stagger_think_ref;
integer *bot_fight_ref; int *bot_fight_ref;
void () void ()
bot_map_load = bot_map_load =
@ -128,7 +128,7 @@ float waypoint_mode, dump_mode;
float direct_route; float direct_route;
float sv_gravity; float sv_gravity;
Bot *route_table; Bot *route_table;
integer busy_waypoints; int busy_waypoints;
float coop = 0; // hack float coop = 0; // hack
@ -139,8 +139,8 @@ void(entity e) frik_setspawnparms = #78;
entity () SV_AllocClient = #0; entity () SV_AllocClient = #0;
void (entity e) SV_FreeClient = #0; void (entity e) SV_FreeClient = #0;
void (entity e, string str) SV_SetUserinfo = #0; void (entity e, string str) SV_SetUserinfo = #0;
void (entity e, integer ping) SV_SetPing = #0; void (entity e, int ping) SV_SetPing = #0;
void (entity cl, float sec, vector angles, vector move, integer buttons, integer impulse) SV_UserCmd = #0; void (entity cl, float sec, vector angles, vector move, int buttons, int impulse) SV_UserCmd = #0;
void (entity cl) SV_Spawn = #0; void (entity cl) SV_Spawn = #0;
void () Break = #6; void () Break = #6;
@ -202,7 +202,7 @@ BotPreFrame =
void () void ()
ClientInRankings = ClientInRankings =
{ {
local integer cl_no = ClientNumber (@self); local int cl_no = ClientNumber (@self);
if (!players[cl_no]) if (!players[cl_no])
players[cl_no] = [[Bot alloc] initFromPlayer:@self]; players[cl_no] = [[Bot alloc] initFromPlayer:@self];
@ -211,14 +211,14 @@ ClientInRankings =
void () void ()
ClientDisconnected = ClientDisconnected =
{ {
local integer cl_no = ClientNumber (@self); local int cl_no = ClientNumber (@self);
local Bot *p = nil; local Bot *p = nil;
p = players[cl_no]; p = players[cl_no];
players[cl_no] = nil; players[cl_no] = nil;
if (p) { if (p) {
local entity e = p.ent; local entity e = p.ent;
local integer i; local int i;
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
if (!players[i]) if (!players[i])
continue; continue;
@ -232,11 +232,11 @@ ClientDisconnected =
// BotConnect and related functions. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // BotConnect and related functions. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
integer (entity cl) int (entity cl)
ClientNumber = ClientNumber =
{ {
local entity e = nil; local entity e = nil;
local integer f = -1; local int f = -1;
do { do {
f++; f++;
@ -247,7 +247,7 @@ ClientNumber =
return f; return f;
}; };
Bot *BotConnect (integer whatbot, integer whatskill) Bot *BotConnect (int whatbot, int whatskill)
{ {
local entity cl; local entity cl;
local Bot *bot; local Bot *bot;
@ -275,7 +275,7 @@ related functions.
*/ */
void () BotImpulses = void () BotImpulses =
{ {
local integer f; local int f;
local string h; local string h;
local Target *t = @self.@this; local Target *t = @self.@this;
@ -285,7 +285,7 @@ void () BotImpulses =
switch (@self.impulse) { switch (@self.impulse) {
case 100: case 100:
h = infokey (nil, "skill"); h = infokey (nil, "skill");
f = (integer) stof (h); f = (int) stof (h);
BotConnect (0, f); BotConnect (0, f);
break; break;
case 102: case 102:
@ -303,17 +303,17 @@ void () BotImpulses =
void () void ()
bot_add_f = bot_add_f =
{ {
local integer whatbot = 0; local int whatbot = 0;
local integer skill; local int skill;
local integer c = Cmd_Argc (); local int c = Cmd_Argc ();
if (c == 1) { if (c == 1) {
skill = (integer) stof (infokey (nil, "skill")); skill = (int) stof (infokey (nil, "skill"));
} else if (c == 2) { } else if (c == 2) {
skill = (integer) stof (Cmd_Argv (1)); skill = (int) stof (Cmd_Argv (1));
} else { } else {
whatbot = (integer) stof (Cmd_Argv (1)); whatbot = (int) stof (Cmd_Argv (1));
skill = (integer) stof (Cmd_Argv (2)); skill = (int) stof (Cmd_Argv (2));
} }
BotConnect (whatbot, skill); 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 // used to show waypoint links for debugging
WriteByte (MSG_BROADCAST, 23); WriteByte (MSG_BROADCAST, 23);
@ -382,9 +382,9 @@ void DeveloperLightning (Waypoint *e1, Waypoint *e2, integer flag)
return [super init]; 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; local entity uself;
SV_Spawn (e); SV_Spawn (e);
@ -430,12 +430,12 @@ void DeveloperLightning (Waypoint *e1, Waypoint *e2, integer flag)
- (id) initFromPlayer: (entity) e - (id) initFromPlayer: (entity) e
{ {
local integer cno; local int cno;
if (!(self = [super initWithEntity:e])) if (!(self = [super initWithEntity:e]))
return nil; return nil;
cno = (integer)e.colormap - 1; cno = (int)e.colormap - 1;
b_clientno = cno; b_clientno = cno;
ishuman = TRUE; ishuman = TRUE;
switch_wallhug = time + 1; switch_wallhug = time + 1;
@ -502,7 +502,7 @@ void DeveloperLightning (Waypoint *e1, Waypoint *e2, integer flag)
// FIXME: do teams properly // FIXME: do teams properly
} }
- (integer) ishuman - (int) ishuman
{ {
return ishuman; return ishuman;
} }
@ -518,7 +518,7 @@ void ()
BotFrame = BotFrame =
{ {
local string h; local string h;
local integer i; local int i;
h = infokey (nil, "bot_options"); h = infokey (nil, "bot_options");
b_options = stof (h); b_options = stof (h);

View file

@ -48,7 +48,7 @@ this notice in its entirety.
#include "libfrikbot.h" #include "libfrikbot.h"
#include "editor.h" #include "editor.h"
integer bot_way_linker; int bot_way_linker;
@implementation Bot (Way) @implementation Bot (Way)
@ -107,8 +107,8 @@ an object.
// 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 int flag;
local integer count, i; local int count, i;
flag = b_clientflag; flag = b_clientflag;
dst = 100000; dst = 100000;
@ -143,7 +143,7 @@ different bot.
-(void)markPath:(Target *)this -(void)markPath:(Target *)this
{ {
local Waypoint *t; local Waypoint *t;
local integer flag; local int flag;
[Waypoint clearMyRoute:self]; [Waypoint clearMyRoute:self];
@ -189,7 +189,7 @@ Boy it's confusing.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/ */
-(integer)beginRoute -(int)beginRoute
{ {
if (busy_waypoints > 0) if (busy_waypoints > 0)
return FALSE; 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) if (this == nil)
return; return;
@ -345,7 +345,7 @@ very good all things considered.
if (editor) { if (editor) {
if (current_way) { if (current_way) {
local Waypoint *way = current_way; local Waypoint *way = current_way;
local integer i; local int i;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
if (way.links[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 float thruwater = 0, pc1 = 0, pc2 = 0;
local vector spot1, org; local vector spot1, org;

View file

@ -42,10 +42,10 @@ this notice in its entirety.
#include "libfrikbot.h" #include "libfrikbot.h"
integer bot_chat_linker; int bot_chat_linker;
@static Bot *b_originator; @static Bot *b_originator;
@static integer b_topic; @static int b_topic;
/* FBX Topics /* FBX Topics
b_originator == self b_originator == self
@ -105,7 +105,7 @@ b_originator == targ
} }
// I didn't like the old code so this is very stripped down // 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) { if (random() < 0.2) {
b_topic = topic; b_topic = topic;

View file

@ -16,9 +16,9 @@
Target *owner; Target *owner;
Waypoint *last_way; Waypoint *last_way;
integer hold_select; int hold_select;
Bot *test_bot; Bot *test_bot;
integer edit_mode; int edit_mode;
} }
+main_menu; +main_menu;
+waypoint_menu; +waypoint_menu;
@ -59,7 +59,7 @@
+confirm; +confirm;
+cancel; +cancel;
+(integer)getHoldSelectState; +(int)getHoldSelectState;
+(void)toggleHoldSelectState; +(void)toggleHoldSelectState;
+(string)getConfirmText; +(string)getConfirmText;
+(Waypoint *)current_way; +(Waypoint *)current_way;

View file

@ -31,9 +31,9 @@
@interface FlagCluster: Object <FlagMenuItem> @interface FlagCluster: Object <FlagMenuItem>
{ {
integer mask; int mask;
} }
- initWithMask:(integer)msk; - initWithMask:(int)msk;
@end @end
@implementation TeleportMenu @implementation TeleportMenu
@ -45,7 +45,7 @@
"Waypoint #"]; "Waypoint #"];
} }
-(integer) impulse:(integer)imp -(int) impulse:(int)imp
{ {
local Waypoint *way = nil; local Waypoint *way = nil;
if ((imp = [super impulse:imp]) == 104) { if ((imp = [super impulse:imp]) == 104) {
@ -64,7 +64,7 @@
@end @end
@implementation NoclipFlag @implementation NoclipFlag
-(integer) state -(int) state
{ {
return @self.movetype == MOVETYPE_NOCLIP; return @self.movetype == MOVETYPE_NOCLIP;
} }
@ -79,7 +79,7 @@
@end @end
@implementation GodmodeFlag @implementation GodmodeFlag
-(integer) state -(int) state
{ {
return !!(@self.flags & FL_GODMODE); return !!(@self.flags & FL_GODMODE);
} }
@ -91,7 +91,7 @@
@end @end
@implementation HoldSelectFlag @implementation HoldSelectFlag
-(integer) state -(int) state
{ {
return [EditorState getHoldSelectState]; return [EditorState getHoldSelectState];
} }
@ -103,7 +103,7 @@
@end @end
@implementation DynamicFlag @implementation DynamicFlag
-(integer) state -(int) state
{ {
return waypoint_mode == WM_EDITOR_DYNAMIC; return waypoint_mode == WM_EDITOR_DYNAMIC;
} }
@ -118,9 +118,9 @@
@end @end
@implementation DynamicLinkFlag @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; return mode == WM_EDITOR_DYNAMIC || mode == WM_EDITOR_DYNLINK;
} }
@ -134,14 +134,14 @@
@end @end
@implementation FlagCluster @implementation FlagCluster
-(id) initWithMask:(integer)msk -(id) initWithMask:(int)msk
{ {
self = [super init]; self = [super init];
mask = msk; mask = msk;
return self; return self;
} }
-(integer) state -(int) state
{ {
local Waypoint *way = [EditorState current_way]; local Waypoint *way = [EditorState current_way];
if (!way) if (!way)
@ -603,7 +603,7 @@
{ {
local EditorState *editor = ((Target *) @self.@this).editor; local EditorState *editor = ((Target *) @self.@this).editor;
local Waypoint *way = [editor current_way]; local Waypoint *way = [editor current_way];
local integer i; local int i;
if (!way) if (!way)
return self; return self;
sprint (@self, PRINT_HIGH, sprint (@self, PRINT_HIGH,
@ -706,7 +706,7 @@
+add_test_bot +add_test_bot
{ {
local EditorState *editor = ((Target *) @self.@this).editor; local EditorState *editor = ((Target *) @self.@this).editor;
local integer f; local int f;
local string h; local string h;
if (editor.test_bot) { if (editor.test_bot) {
@ -714,7 +714,7 @@
return self; return self;
} }
h = infokey (nil, "skill"); h = infokey (nil, "skill");
f = (integer) stof (h); f = (int) stof (h);
editor.test_bot = BotConnect (0, f); editor.test_bot = BotConnect (0, f);
return self; return self;
} }
@ -860,7 +860,7 @@
} }
+(integer)getHoldSelectState +(int)getHoldSelectState
{ {
local EditorState *editor = ((Target *) @self.@this).editor; local EditorState *editor = ((Target *) @self.@this).editor;
return editor.hold_select != 0; return editor.hold_select != 0;

View file

@ -13,7 +13,7 @@
@end @end
@protocol FlagMenuItem @protocol FlagMenuItem
-(integer) state; -(int) state;
-(void) toggle; -(void) toggle;
@end @end
@ -37,13 +37,13 @@
string text; string text;
} }
- (id) initWithText:(string)txt; - (id) initWithText:(string)txt;
- (integer) impulse:(integer)imp; - (int) impulse:(int)imp;
- (string) text; - (string) text;
@end @end
@interface ImpulseValueMenu: ImpulseMenu @interface ImpulseValueMenu: ImpulseMenu
{ {
integer value; int value;
} }
@end @end

View file

@ -29,7 +29,7 @@
- (string) text - (string) text
{ {
local integer state = (integer)[flag state]; local int state = (int)[flag state];
return sprintf ("[%c] %s", state ? '#' : ' ', [super text]); return sprintf ("[%c] %s", state ? '#' : ' ', [super text]);
} }
@ -62,7 +62,7 @@
return self; return self;
} }
- (integer) impulse: (integer) imp - (int) impulse: (int) imp
{ {
return imp; return imp;
} }
@ -74,7 +74,7 @@
@end @end
@implementation ImpulseValueMenu @implementation ImpulseValueMenu
- (integer) impulse: (integer) imp - (int) impulse: (int) imp
{ {
if (imp < 1 || imp > 10) if (imp < 1 || imp > 10)
return imp; return imp;
@ -94,14 +94,14 @@
value = 0; value = 0;
} }
- (integer) value - (int) value
{ {
return value; return value;
} }
@end @end
@implementation ImpulseListMenu @implementation ImpulseListMenu
- (integer) impulse: (integer) imp - (int) impulse: (int) imp
{ {
if (imp < 1 || imp > 10) if (imp < 1 || imp > 10)
return imp; return imp;
@ -114,9 +114,9 @@
{ {
local string str = text; local string str = text;
local string s; local string s;
local integer i; local int i;
local string is[10]; local string is[10];
local integer max_len = 0, len; local int max_len = 0, len;
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
if (!items[i]) if (!items[i])
@ -141,7 +141,7 @@
- (void) addItem:(MenuItem *) item - (void) addItem:(MenuItem *) item
{ {
local integer i; local int i;
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
if (!items[i]) { if (!items[i]) {

View file

@ -16,18 +16,18 @@ typedef struct bot_data_t bot_data_t;
{ {
@public @public
Waypoint *current_way; Waypoint *current_way;
integer hold_select; int hold_select;
Target *_last; Target *_last;
EditorState *editor; EditorState *editor;
} }
+(Target *)forEntity:(entity)e; +(Target *)forEntity:(entity)e;
-(vector)realorigin; -(vector)realorigin;
-(vector)origin; -(vector)origin;
-(integer)canSee:(Target *)targ ignoring:(entity)ignore; -(int)canSee:(Target *)targ ignoring:(entity)ignore;
-(void)setOrigin:(vector) org; -(void)setOrigin:(vector) org;
-(integer)recognizePlat:(integer)flag; -(int)recognizePlat:(int)flag;
-(integer)ishuman; -(int)ishuman;
-(integer)priority:(Bot *)bot; -(int)priority:(Bot *)bot;
-(Waypoint *)findWaypoint:(Waypoint *)start; -(Waypoint *)findWaypoint:(Waypoint *)start;
-(float)searchTime; -(float)searchTime;
-(void)setSearchTime:(float)st; -(void)setSearchTime:(float)st;
@ -38,13 +38,13 @@ typedef struct bot_data_t bot_data_t;
{ {
@public @public
Waypoint *links[4]; Waypoint *links[4];
integer flags; int flags;
vector origin; vector origin;
integer is_temp; int is_temp;
integer bot_bits; int bot_bits;
integer busy; //??? int busy; //???
float distance; float distance;
Waypoint *enemy; Waypoint *enemy;
float search_time; float search_time;
@ -53,7 +53,7 @@ typedef struct bot_data_t bot_data_t;
} }
+(void)loadFile:(string)path; +(void)loadFile:(string)path;
+(void)clearAll; +(void)clearAll;
+(Waypoint *)waypointForNum:(integer)num; +(Waypoint *)waypointForNum:(int)num;
+(void)fixWaypoints; +(void)fixWaypoints;
+(PLItem *)plist; +(PLItem *)plist;
+(void)check:(Target *)ent; +(void)check:(Target *)ent;
@ -67,17 +67,17 @@ typedef struct bot_data_t bot_data_t;
-(void)deselect; -(void)deselect;
-(void)select; -(void)select;
-(integer)id; -(int)id;
-(id)init; -(id)init;
-(id)initAt:(vector)org; -(id)initAt:(vector)org;
-(id)initFromEntity:(entity)ent; -(id)initFromEntity:(entity)ent;
-(integer)isLinkedTo:(Waypoint *)way; -(int)isLinkedTo:(Waypoint *)way;
-(integer)linkWay:(Waypoint *)way; -(int)linkWay:(Waypoint *)way;
-(integer)teleLinkWay:(Waypoint *)way; -(int)teleLinkWay:(Waypoint *)way;
-(void)unlinkWay:(Waypoint *)way; -(void)unlinkWay:(Waypoint *)way;
-(void)followLink:(Waypoint *)e2 :(integer)bBit; -(void)followLink:(Waypoint *)e2 :(int)bBit;
-(void)waypointThink; -(void)waypointThink;
-(void)clearLinks; -(void)clearLinks;
@ -92,32 +92,32 @@ typedef struct bot_data_t bot_data_t;
@interface Bot: Target @interface Bot: Target
{ {
@public @public
integer keys; int keys;
integer buttons; int buttons;
integer impulse; int impulse;
vector b_angle; vector b_angle;
vector mouse_emu; vector mouse_emu;
integer wallhug; int wallhug;
integer ishuman; int ishuman;
float b_frags; // for detecting score changes float b_frags; // for detecting score changes
integer b_clientno; int b_clientno;
integer b_clientflag; int b_clientflag;
float b_shirt; float b_shirt;
float b_pants; float b_pants;
float ai_time; float ai_time;
float b_sound; float b_sound;
float missile_speed; float missile_speed;
float portal_time; float portal_time;
integer b_skill; int b_skill;
float switch_wallhug; float switch_wallhug;
integer b_aiflags; int b_aiflags;
integer b_num; int b_num;
float b_chattime; float b_chattime;
float b_entertime; float b_entertime;
integer route_failed; int route_failed;
integer dyn_flags; int dyn_flags;
integer dyn_plat; int dyn_plat;
float dyn_time; float dyn_time;
Waypoint *temp_way; Waypoint *temp_way;
Waypoint *last_way; Waypoint *last_way;
@ -132,7 +132,7 @@ typedef struct bot_data_t bot_data_t;
float portal_time; float portal_time;
} }
- (id) init; - (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; - (id) initFromPlayer: (entity) e;
- (void) preThink; - (void) preThink;
- (void) postThink; - (void) postThink;
@ -144,9 +144,9 @@ typedef struct bot_data_t bot_data_t;
@end @end
@interface Bot (Misc) @interface Bot (Misc)
+(bot_data_t *)name:(integer)r; +(bot_data_t *)name:(int)r;
+(bot_data_t *)randomName; +(bot_data_t *)randomName;
-(integer)fov:(entity)targ; -(int)fov:(entity)targ;
+(void)kick; +(void)kick;
-(void)add; -(void)add;
@ -155,30 +155,30 @@ typedef struct bot_data_t bot_data_t;
@interface Bot (Move) @interface Bot (Move)
- (void)sendMove; - (void)sendMove;
- (void)jump; - (void)jump;
- (integer)canRJ; - (int)canRJ;
- (integer)recognizePlat: (integer) flag; - (int)recognizePlat: (int) flag;
- (integer)keysForDir: (vector) sdir; - (int)keysForDir: (vector) sdir;
- (void)obstructed: (vector) whichway : (integer) danger; - (void)obstructed: (vector) whichway : (int) danger;
- (void)obstacles; - (void)obstacles;
- (void)dodgeObstruction; - (void)dodgeObstruction;
- (void)movetogoal; - (void)movetogoal;
- (integer)walkmove: (vector) weird; - (int)walkmove: (vector) weird;
- (void)roam; - (void)roam;
@end @end
@interface Bot (AI) @interface Bot (AI)
-(integer)targetOnstack:(Target *)scot; -(int)targetOnstack:(Target *)scot;
-(void)targetAdd:(Target *)e; -(void)targetAdd:(Target *)e;
-(void)targetDrop:(Target *)e; -(void)targetDrop:(Target *)e;
-(void)targetClearAll; -(void)targetClearAll;
-(void)lost:(Target *)targ :(integer)success; -(void)lost:(Target *)targ :(int)success;
-(void)checkLost:(Target *)targ; -(void)checkLost:(Target *)targ;
-(void)handleAI; -(void)handleAI;
-(void)path; -(void)path;
-(void)lookForCrap:(integer)scope; -(void)lookForCrap:(int)scope;
-(void)angleSet; -(void)angleSet;
-(void)AI; -(void)AI;
-(integer)priorityForThing:(Target *)thing; -(int)priorityForThing:(Target *)thing;
@end @end
@interface Bot (Fight) @interface Bot (Fight)
@ -194,16 +194,16 @@ typedef struct bot_data_t bot_data_t;
-(entity)findThing:(string)s; -(entity)findThing:(string)s;
-(Waypoint *)findRoute:(Waypoint *)lastone; -(Waypoint *)findRoute:(Waypoint *)lastone;
-(void)markPath:(Target *)this; -(void)markPath:(Target *)this;
-(void)getPath:(Target *)this :(integer)direct; -(void)getPath:(Target *)this :(int)direct;
-(integer)beginRoute; -(int)beginRoute;
-(void)spawnTempWaypoint:(vector)org; -(void)spawnTempWaypoint:(vector)org;
-(void)dynamicWaypoint; -(void)dynamicWaypoint;
-(integer)canSee:(Target *)targ; -(int)canSee:(Target *)targ;
@end @end
@interface Bot (Chat) @interface Bot (Chat)
-(void)startTopic:(integer)topic; -(void)startTopic:(int)topic;
-(void)say:(string)msg; -(void)say:(string)msg;
-(void)say2:(string)msg; -(void)say2:(string)msg;
-(void)sayTeam:(string)msg; -(void)sayTeam:(string)msg;
@ -294,21 +294,21 @@ typedef struct bot_data_t bot_data_t;
@extern float direct_route; @extern float direct_route;
@extern float sv_gravity; @extern float sv_gravity;
@extern Bot *route_table; @extern Bot *route_table;
@extern integer busy_waypoints; @extern int busy_waypoints;
@extern float coop; @extern float coop;
// -------ProtoTypes------ // -------ProtoTypes------
// external, in main code // external, in main code
@extern Bot *BotConnect (integer whatbot, integer whatskill); @extern Bot *BotConnect (int whatbot, int whatskill);
@extern void() ClientConnect; @extern void() ClientConnect;
@extern void() ClientDisconnect; @extern void() ClientDisconnect;
@extern void() SetNewParms; @extern void() SetNewParms;
// rankings // 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_dm1;
@extern void () map_dm2; @extern void () map_dm2;
@ -324,20 +324,20 @@ typedef struct bot_data_t bot_data_t;
@extern vector(entity ent) realorigin; @extern vector(entity ent) realorigin;
@extern float(float v) frik_anglemod; @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 angles is pitch yaw roll
move is forward right up 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 void () Break;
@extern string (integer i) itos; @extern string (int i) itos;
@extern integer bot_way_linker; @extern int bot_way_linker;
@extern integer bot_move_linker; @extern int bot_move_linker;
@extern integer bot_chat_linker; @extern int bot_chat_linker;
@extern float stagger_think; @extern float stagger_think;
@extern integer bot_fight_linker; @extern int bot_fight_linker;
#include "defs.h" #include "defs.h"

View file

@ -60,7 +60,7 @@ struct target_s {
return nil;//FIXME 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 *t1 = e1;
local Target *t2 = e2; local Target *t2 = e2;
@ -104,7 +104,7 @@ struct target_s {
return ent.origin; return ent.origin;
} }
-(integer)canSee:(Target *)targ ignoring:(entity)ignore -(int)canSee:(Target *)targ ignoring:(entity)ignore
{ {
local vector spot1, spot2; local vector spot1, spot2;
@ -126,7 +126,7 @@ struct target_s {
{ {
} }
- (integer) recognizePlat: (integer) flag - (int) recognizePlat: (int) flag
{ {
local vector org = [self origin]; local vector org = [self origin];
traceline (org, org - '0 0 64', TRUE, ent); traceline (org, org - '0 0 64', TRUE, ent);
@ -136,12 +136,12 @@ struct target_s {
return FALSE; return FALSE;
} }
-(integer)ishuman -(int)ishuman
{ {
return 0; return 0;
} }
-(integer)priority:(Bot *)bot -(int)priority:(Bot *)bot
{ {
if ((ent.flags & FL_ITEM) && ent.model && ent.search_time < time) { if ((ent.flags & FL_ITEM) && ent.model && ent.search_time < time) {
// ugly hack // ugly hack
@ -209,8 +209,8 @@ Finds the closest, fisible, waypoint to e
local Waypoint *best, *t; local Waypoint *best, *t;
local float dst, tdst; local float dst, tdst;
local vector org; local vector org;
local integer count, i; local int count, i;
local integer ishuman = [self ishuman]; local int ishuman = [self ishuman];
org = [self realorigin]; org = [self realorigin];

View file

@ -67,9 +67,9 @@ Array *waypoint_array;
@implementation Waypoint @implementation Waypoint
-(integer)id -(int)id
{ {
integer index = [waypoint_array indexOfObject:self]; int index = [waypoint_array indexOfObject:self];
if (index != NotFound) if (index != NotFound)
return index + 1; return index + 1;
return 0; return 0;
@ -93,7 +93,7 @@ Array *waypoint_array;
return self; 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]; self = [self initAt:org];
links[0] = (Waypoint *) link[0]; links[0] = (Waypoint *) link[0];
@ -140,9 +140,9 @@ Array *waypoint_array;
links[0] = links[1] = links[2] = links[3] = nil; 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) if (way == self || !way || !self)
return 0; return 0;
@ -157,9 +157,9 @@ Array *waypoint_array;
return 0; return 0;
} }
-(integer)linkWay:(Waypoint *)way -(int)linkWay:(Waypoint *)way
{ {
local integer i; local int i;
if (self == way || !self || !way) if (self == way || !self || !way)
return 0; return 0;
@ -176,9 +176,9 @@ Array *waypoint_array;
} }
// Link Ways part 2, used only for teleporters // 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) if (self == way || !self || !way)
return 0; return 0;
@ -197,7 +197,7 @@ Array *waypoint_array;
-(void)unlinkWay:(Waypoint *)way -(void)unlinkWay:(Waypoint *)way
{ {
local integer i; local int i;
if (self == way || !self || !way) if (self == way || !self || !way)
return; return;
@ -225,7 +225,7 @@ Waypoint Loading from file
local QFile file; local QFile file;
local PLItem *plist; local PLItem *plist;
local string plist_data; local string plist_data;
local integer i, count; local int i, count;
file = QFS_OpenFile (path); file = QFS_OpenFile (path);
if (!file) { if (!file) {
@ -249,9 +249,9 @@ Waypoint Loading from file
//FIXME compiler/vm "bug" makes passing pointers to locals dangerous //FIXME compiler/vm "bug" makes passing pointers to locals dangerous
s = (PLString *) [way getObjectForKey:"flags"]; 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]; s = (PLString *) [links getObjectAtIndex:0];
link[0] = stoi ([s string]); link[0] = stoi ([s string]);
s = (PLString *) [links getObjectAtIndex:1]; s = (PLString *) [links getObjectAtIndex:1];
@ -274,7 +274,7 @@ Waypoint Loading from file
waypoint_init (); waypoint_init ();
} }
+(Waypoint *)waypointForNum:(integer)num +(Waypoint *)waypointForNum:(int)num
{ {
if (!num) if (!num)
return nil; return nil;
@ -283,10 +283,10 @@ Waypoint Loading from file
-(void)fix -(void)fix
{ {
local integer i, tmp; local int i, tmp;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
tmp = (integer)links[i]; tmp = (int)links[i];
links[i] = [Waypoint waypointForNum:tmp]; 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 // you don't want this. it's harsh. overflows normal servers and clients
-(void) debug -(void) debug
{ {
local integer i; local int i;
local vector dir, dest, pos; local vector dir, dest, pos;
@self = spawn (); @self = spawn ();
@ -331,7 +331,7 @@ Waypoint Loading from file
{ {
local PLDictionary *way = (PLDictionary *) [PLItem newDictionary]; local PLDictionary *way = (PLDictionary *) [PLItem newDictionary];
local PLArray *l = (PLArray *) [PLItem newArray]; local PLArray *l = (PLArray *) [PLItem newArray];
local integer i; local int i;
[way addKey:"origin" value:[PLItem newString:sprintf ("%g %g %g", [way addKey:"origin" value:[PLItem newString:sprintf ("%g %g %g",
origin.x, origin.x,
@ -358,7 +358,7 @@ Waypoint Loading from file
-(void) checkWay:(Target *)ent -(void) checkWay:(Target *)ent
{ {
local integer i; local int i;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
if (links[i]) if (links[i])
break; break;
@ -383,7 +383,7 @@ Waypoint Loading from file
{ {
local vector dif; local vector dif;
local float dist; local float dist;
local integer i, count; local int i, count;
local Waypoint *way = nil, *w; local Waypoint *way = nil, *w;
rad = rad * rad; // radius squared 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; local float dist;
@ -522,7 +522,7 @@ tripping the runaway loop counter
-(void)waypointThink -(void)waypointThink
{ {
local integer i; local int i;
if (distance == -1) if (distance == -1)
return; return;
@ -573,7 +573,7 @@ tripping the runaway loop counter
return self; return self;
} }
-(integer)priority:(Bot *)bot -(int)priority:(Bot *)bot
{ {
if (flags & AI_SNIPER) if (flags & AI_SNIPER)
return 30; return 30;
@ -615,20 +615,20 @@ void() waypoint =
/* create a new waypoint using frikbot style info /* create a new waypoint using frikbot style info
org origin of the waypoint org origin of the waypoint
bit1 first 3 links (cast to integer) bit1 first 3 links (cast to int)
bit4 fourth link bit4 fourth link
flargs various flags flargs various flags
links are 1 based with 0 being no link and 1 being the first waypoint links are 1 based with 0 being no link and 1 being the first waypoint
created, 2 the second and so on. 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]; local Waypoint *y = [[Waypoint alloc] initAt:org];
waypoint_mode = WM_LOADED; waypoint_mode = WM_LOADED;
y.flags = flargs; y.flags = flargs;
y.links[0] = (Waypoint *) (integer) bit1.x; y.links[0] = (Waypoint *) (int) bit1.x;
y.links[1] = (Waypoint *) (integer) bit1.y; y.links[1] = (Waypoint *) (int) bit1.y;
y.links[2] = (Waypoint *) (integer) bit1.z; y.links[2] = (Waypoint *) (int) bit1.z;
y.links[3] = (Waypoint *) (integer) bit4; y.links[3] = (Waypoint *) (int) bit4;
}; };

View file

@ -428,7 +428,7 @@ float rj;
.float speed; .float speed;
.integer lefty; .int lefty;
.float search_time; .float search_time;
.float attack_state; .float attack_state;

View file

@ -175,7 +175,7 @@ void() SUB_CalcAngleMoveDone =
void() DelayThink = void() DelayThink =
{ {
local integer rem = self.killtarget != self.targetname; local int rem = self.killtarget != self.targetname;
activator = self.enemy; activator = self.enemy;
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -524,7 +524,7 @@ void() trigger_onlyregistered_touch =
self.attack_finished = time + 2; self.attack_finished = time + 2;
if (cvar("registered")) if (cvar("registered"))
{ {
local integer rem = self.targetname != self.killtarget; local int rem = self.targetname != self.killtarget;
self.message = ""; self.message = "";
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -134,7 +134,7 @@ float(float a) CamReAngle =
// point visibility test // point visibility test
integer(vector vec) CamVisible = int(vector vec) CamVisible =
{ {
traceline(self.origin,vec,TRUE,self); traceline(self.origin,vec,TRUE,self);
return ((trace_fraction == 1) && !((trace_inopen && trace_inwater))); return ((trace_fraction == 1) && !((trace_inopen && trace_inwater)));
@ -143,7 +143,7 @@ integer(vector vec) CamVisible =
// entity visibility test // entity visibility test
// suited for players and player size bots; may vary for various classnames // suited for players and player size bots; may vary for various classnames
integer(entity ent) CamVisibleEnt = int(entity ent) CamVisibleEnt =
{ {
local vector vec; local vector vec;
@ -215,7 +215,7 @@ float(float d, float a) CamHurry =
vector(float s, float v, float a) CamSmooth = vector(float s, float v, float a) CamSmooth =
{ {
local float dt,t1,t2,v2,as,sv2; local float dt,t1,t2,v2,as,sv2;
local integer b; local int b;
local vector vec; local vector vec;
s = CamReAngle(s); s = CamReAngle(s);

View file

@ -184,7 +184,7 @@ void() SUB_CalcAngleMoveDone =
void() DelayThink = void() DelayThink =
{ {
local integer rem = self.killtarget != self.targetname; local int rem = self.killtarget != self.targetname;
activator = self.enemy; activator = self.enemy;
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -520,7 +520,7 @@ void() trigger_onlyregistered_touch =
self.attack_finished = time + 2; self.attack_finished = time + 2;
if (cvar("registered")) if (cvar("registered"))
{ {
local integer rem = self.targetname != self.killtarget; local int rem = self.targetname != self.killtarget;
self.message = ""; self.message = "";
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -153,7 +153,7 @@ void() SUB_CalcAngleMoveDone =
//============================================================================= //=============================================================================
void() DelayThink = void() DelayThink =
{ {
local integer rem = self.killtarget != self.targetname; local int rem = self.killtarget != self.targetname;
activator = self.enemy; activator = self.enemy;
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -441,7 +441,7 @@ void() trigger_onlyregistered_touch =
self.attack_finished = time + 2; self.attack_finished = time + 2;
if (cvar("registered")) if (cvar("registered"))
{ {
local integer rem = self.targetname != self.killtarget; local int rem = self.targetname != self.killtarget;
self.message = ""; self.message = "";
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -445,7 +445,7 @@ float skill;
.float speed; .float speed;
.integer lefty; .int lefty;
.float search_time; .float search_time;
.float attack_state; .float attack_state;

View file

@ -184,7 +184,7 @@ void() SUB_CalcAngleMoveDone =
void() DelayThink = void() DelayThink =
{ {
local integer rem = self.killtarget != self.targetname; local int rem = self.killtarget != self.targetname;
activator = self.enemy; activator = self.enemy;
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -477,7 +477,7 @@ void() trigger_onlyregistered_touch =
self.attack_finished = time + 2; self.attack_finished = time + 2;
if (cvar("registered")) { if (cvar("registered")) {
local integer rem = self.targetname != self.killtarget; local int rem = self.targetname != self.killtarget;
self.message = ""; self.message = "";
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -173,7 +173,7 @@ SUB_CalcAngleMoveDone =
void () void ()
DelayThink = DelayThink =
{ {
local integer rem = self.killtarget != self.targetname; local int rem = self.killtarget != self.targetname;
activator = self.enemy; activator = self.enemy;
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)

View file

@ -480,7 +480,7 @@ trigger_onlyregistered_touch =
self.attack_finished = time + 2; self.attack_finished = time + 2;
if (cvar ("registered")) { if (cvar ("registered")) {
local integer rem = self.targetname != self.killtarget; local int rem = self.targetname != self.killtarget;
self.message = ""; self.message = "";
SUB_UseTargets (); SUB_UseTargets ();
if (rem) if (rem)