bots properally use weapons

This commit is contained in:
ineed bots
2024-09-21 23:36:57 -06:00
parent 0028ed705f
commit 3bc50e5a33
4 changed files with 360 additions and 4 deletions

View File

@@ -96,6 +96,17 @@ BotBuiltinBotAngles( angles )
}
}
/*
Sets weapon
*/
BotBuiltinBotWeapon( weapon )
{
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "botweapon" ] ) )
{
self [[ level.bot_builtins[ "botweapon" ] ]]( weapon );
}
}
/*
Returns if player is the host
*/
@@ -479,6 +490,11 @@ ClearPriorityObjective()
self notify( "kill_goal" );
}
isPlantingOrDefusing()
{
return isdefined( self.progressbackground );
}
/*
If the site is in use
*/
@@ -591,6 +607,16 @@ getWeaponSlot( weap )
}
}
getWeaponsListPrimaries()
{
answer = [];
answer[ answer.size ] = self getweaponslotweapon( "primary" );
answer[ answer.size ] = self getweaponslotweapon( "primaryb" );
return answer;
}
/*
cOD2
*/