X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fbot.qc;h=c033daeecebead6955d18eabdddb2ae2b108e7a9;hb=70b84d37e2cf1d5336c327cb43593024de2a2c6c;hp=a6762c76d0996c7e5db33ec098dcc77eada42e19;hpb=a240e0309a8ec5837f3ac3d37c168f5262e53d5b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index a6762c76d..c033daeec 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -31,9 +31,6 @@ #include "../../csqcmodellib/sv_model.qh" -#include "../../dpdefs/dpextensions.qh" -#include "../../dpdefs/progsdefs.qh" - #include "../../warpzonelib/common.qh" #include "../../warpzonelib/util_server.qh" @@ -300,42 +297,42 @@ void bot_custom_weapon_priority_setup() tokens = tokenizebyseparator(W_NumberWeaponOrder(autocvar_bot_ai_custom_weapon_priority_far)," "); int c = 0; - for(i=0; i < tokens && c < WEP_COUNT; ++i){ + for(i=0; i < tokens && c < Weapons_COUNT; ++i){ w = stof(argv(i)); if ( w >= WEP_FIRST && w <= WEP_LAST) { bot_weapons_far[c] = w; ++c; } } - if(c < WEP_COUNT) + if(c < Weapons_COUNT) bot_weapons_far[c] = -1; // Parse mid distance weapon priorities tokens = tokenizebyseparator(W_NumberWeaponOrder(autocvar_bot_ai_custom_weapon_priority_mid)," "); c = 0; - for(i=0; i < tokens && c < WEP_COUNT; ++i){ + for(i=0; i < tokens && c < Weapons_COUNT; ++i){ w = stof(argv(i)); if ( w >= WEP_FIRST && w <= WEP_LAST) { bot_weapons_mid[c] = w; ++c; } } - if(c < WEP_COUNT) + if(c < Weapons_COUNT) bot_weapons_mid[c] = -1; // Parse close distance weapon priorities tokens = tokenizebyseparator(W_NumberWeaponOrder(autocvar_bot_ai_custom_weapon_priority_close)," "); c = 0; - for(i=0; i < tokens && i < WEP_COUNT; ++i){ + for(i=0; i < tokens && i < Weapons_COUNT; ++i){ w = stof(argv(i)); if ( w >= WEP_FIRST && w <= WEP_LAST) { bot_weapons_close[c] = w; ++c; } } - if(c < WEP_COUNT) + if(c < Weapons_COUNT) bot_weapons_close[c] = -1; bot_custom_weapon = true;