bot chatter system

This commit is contained in:
ineed bots 2022-05-08 14:43:51 -06:00
parent f667c96717
commit 9c20cf621b
5 changed files with 2222 additions and 3 deletions

View File

@ -226,6 +226,14 @@ onPlayerKilled( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sH
self maps\mp\bots\_bot_script::onKilled( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration );
}
self.lastAttacker = eAttacker;
if ( isDefined( eAttacker ) )
{
eAttacker.lastKilledPlayer = self;
eAttacker notify( "killed_enemy" );
}
self [[level.prevCallbackPlayerKilled]]( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration );
}

File diff suppressed because it is too large Load Diff

View File

@ -66,6 +66,7 @@ onKillcam()
doKillcamStuff()
{
self endon( "disconnect" );
self endon( "spawned_player" );
self BotNotifyBotEvent( "killcam", "start" );

View File

@ -464,6 +464,29 @@ getValidGrenade()
return random( possibles );
}
/*
CoD4 meme
*/
getWinningTeam()
{
if ( maps\mp\gametypes\_globallogic::getGameScore( "allies" ) == maps\mp\gametypes\_globallogic::getGameScore( "axis" ) )
winner = "tie";
else if ( maps\mp\gametypes\_globallogic::getGameScore( "allies" ) > maps\mp\gametypes\_globallogic::getGameScore( "axis" ) )
winner = "allies";
else
winner = "axis";
return winner;
}
/*
CoD4
*/
getBaseWeaponName( weap )
{
return strtok( weap, "_" )[0];
}
/*
Returns if the given weapon is full auto.
*/

View File

@ -17,6 +17,7 @@ CodeCallback_StartGameType()
level.gametypestarted = true; // so we know that the gametype has been started up
level thread maps\mp\bots\_bot::init();
level thread maps\mp\bots\_bot_chat::init();
level thread maps\mp\bots\_menu::init();
level thread maps\mp\bots\_wp_editor::init();
}