Linux: fixed warnings in ai_cmd.cpp

This commit is contained in:
Walter Julius Hennecke 2012-12-30 21:29:58 +01:00
parent 95de78c994
commit 7390c7ef91

View file

@ -1462,7 +1462,7 @@ void BotMatch_WhatIsMyCommand(bot_state_t *bs, bot_match_t *match) {
BotNearestVisibleItem BotNearestVisibleItem
================== ==================
*/ */
float BotNearestVisibleItem(bot_state_t *bs, char *itemname, bot_goal_t *goal) { float BotNearestVisibleItem(bot_state_t *bs, const char *itemname, bot_goal_t *goal) {
int i; int i;
char name[64]; char name[64];
bot_goal_t tmpgoal; bot_goal_t tmpgoal;
@ -1473,7 +1473,7 @@ float BotNearestVisibleItem(bot_state_t *bs, char *itemname, bot_goal_t *goal) {
bestdist = 999999; bestdist = 999999;
i = -1; i = -1;
do { do {
i = gi.BotGetLevelItemGoal(i, itemname, &tmpgoal); i = gi.BotGetLevelItemGoal(i, (char*)itemname, &tmpgoal);
gi.BotGoalName(tmpgoal.number, name, sizeof(name)); gi.BotGoalName(tmpgoal.number, name, sizeof(name));
if (Q_stricmp(itemname, name) != 0) if (Q_stricmp(itemname, name) != 0)
continue; continue;
@ -1501,7 +1501,7 @@ void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) {
int i, bestitem, redtt, bluett, client; int i, bestitem, redtt, bluett, client;
bot_goal_t goal; bot_goal_t goal;
char netname[MAX_MESSAGE_SIZE]; char netname[MAX_MESSAGE_SIZE];
char *nearbyitems[] = { const char *nearbyitems[] = {
"Shotgun", "Shotgun",
"Grenade Launcher", "Grenade Launcher",
"Rocket Launcher", "Rocket Launcher",