cvar_set(placename, strcat(substring(s2, p+1, -1), " ", s));
//print("places: ", placename, " := ", cvar_string(placename), "\n");
}
- e = find(world, targetname, s);
+ e = find(NULL, targetname, s);
if(!e)
LOG_INFO("invalid place ", s, "\n");
if(i < MAX_BOT_PLACES)
}
else
{
- e = find(world, targetname, placename);
+ e = find(NULL, targetname, placename);
if(!e)
LOG_INFO("invalid place ", placename, "\n");
return e;
bot = bot.chain;
}
- return world;
+ return NULL;
}
// Returns a bot by number on list
float c = 0;
if(!number)
- return world;
+ return NULL;
bot = findchainflags(flags, FL_CLIENT);
while (bot)
bot = bot.chain;
}
- return world;
+ return NULL;
}
float bot_decodecommand(string cmdstring)
case "speed":
return vlen(this.velocity);
case "flagcarrier":
- return ((this.flagcarried!=world));
+ return ((this.flagcarried!=NULL));
}
LOG_INFO(strcat("ERROR: Unable to convert the expression '",expr,"' into a numeric value\n"));
void bot_setcurrentcommand(entity this)
{
- bot_cmd = world;
+ bot_cmd = NULL;
if(!this.bot_cmd_current)
{
else
{
// Invalid command, remove from queue
- bot_cmd = world;
+ bot_cmd = NULL;
bot_dequeuecommand(this, this.bot_cmd_execution_index);
this.bot_cmd_execution_index++;
}
}
else
- bot_cmd = world;
+ bot_cmd = NULL;
}
}
// old logic kept pressing previously pressed keys, but that has problems
// (namely, it means you cannot make a bot "normal" ever again)
// to keep a bot walking for a while, use the "wait" bot command
- if(bot_cmd == world)
+ if(bot_cmd == NULL)
return false;
// Ignore all commands except continue when the bot is paused