void botConnect( int whichteam, int whichClass, char* name ) { gedict_t *oself; int ednum; gedict_t *ent = &g_edicts[ednum = trap_AddBot( name, 0, 0, "base" )]; if ( ent == world ) { G_sprint( self, 2, "cannot add bot\n" ); return; } oself = self; self = ent; self->bot_skin = whichClass; self->bot_team = whichteam; ClearAllWaypoints( ); ClearAllTargets( ); self->action = BOT_RESUPPLYING; self->obs_time = 0; self->oldAction = BOT_IDLE; self = oself; }
void GoForResupply() { if ( self->action == BOT_FIGHTING ) return; self->action = BOT_RESUPPLYING; ClearAllTargets(); ClearAllWaypoints(); self->s.v.button1 = 0; self->s.v.button2 = 0; }