But i still think that share some random codes will help ourself to improve and also to find some nice clues about how to improve it.
So share a part of your "mods" and get a nice talk in order to improve it.
I will write it, in a raw way, part of my code about forcing bots to use only gauntlet inside a match:
Code: Select all
/*###########################
# BOTS USES ONLY GAUNTLET #
###########################
*/
mod on g_main.c
add
vmCvar_t bot_onlygauntlet;
add
{ &bot_onlygauntlet, "bot_onlygauntlet", "0", CVAR_SERVERINFO, 0, qtrue },
mod on g_local.h
extern vmCvar_t bot_onlygauntlet;
mod on ai_dmq3.c
on "void BotChooseWeapon(bot_state_t *bs) {"
after the line
"int newweaponnum;"
add the following line
if (bot_onlygauntlet.integer == 1){ //if the cvar is 1
bs->weaponnum = 1; //the selected weaponnum will be 1 = gauntlet you can specify also WP_GAUNTLET instead of 1
return; // stop here and don't go on with the other instruction
}
ever on ai_dmq3.c
check for "float BotAgression" and add // i don't know if is usefull add this stuff
if (bot_onlygauntlet.integer == 1) {
return 100; // we want them aggressive and chasing the player also with gauntlet
}
and also on "float BotFeelingBad"
change the first lines in order to figure like this
if (bs->weaponnum == WP_GAUNTLET && bot_onlygauntlet.integer != 1) {
return 100;
}
//the bot will feel bad with gauntlet but only if the bot_onlygauntlet cvar will be != 1 so theorically our bot_onlygauntlet
//cvar will send back (if the cvar will be 1) a feelingbad == 0