mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-21 18:05:44 +00:00
bot chatter system
This commit is contained in:
parent
f667c96717
commit
9c20cf621b
@ -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 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 );
|
self [[level.prevCallbackPlayerKilled]]( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, timeOffset, deathAnimDuration );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2186
main_shared/maps/mp/bots/_bot_chat.gsc
Normal file
2186
main_shared/maps/mp/bots/_bot_chat.gsc
Normal file
File diff suppressed because it is too large
Load Diff
@ -66,6 +66,7 @@ onKillcam()
|
|||||||
doKillcamStuff()
|
doKillcamStuff()
|
||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
self endon( "spawned_player" );
|
||||||
|
|
||||||
self BotNotifyBotEvent( "killcam", "start" );
|
self BotNotifyBotEvent( "killcam", "start" );
|
||||||
|
|
||||||
|
@ -464,6 +464,29 @@ getValidGrenade()
|
|||||||
return random( possibles );
|
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.
|
Returns if the given weapon is full auto.
|
||||||
*/
|
*/
|
||||||
|
@ -15,8 +15,9 @@ CodeCallback_StartGameType()
|
|||||||
[[level.callbackStartGameType]]();
|
[[level.callbackStartGameType]]();
|
||||||
|
|
||||||
level.gametypestarted = true; // so we know that the gametype has been started up
|
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::init();
|
||||||
|
level thread maps\mp\bots\_bot_chat::init();
|
||||||
level thread maps\mp\bots\_menu::init();
|
level thread maps\mp\bots\_menu::init();
|
||||||
level thread maps\mp\bots\_wp_editor::init();
|
level thread maps\mp\bots\_wp_editor::init();
|
||||||
}
|
}
|
||||||
@ -91,7 +92,7 @@ Setup any misc callbacks stuff like defines and default callbacks
|
|||||||
SetupCallbacks()
|
SetupCallbacks()
|
||||||
{
|
{
|
||||||
SetDefaultCallbacks();
|
SetDefaultCallbacks();
|
||||||
|
|
||||||
// Set defined for damage flags used in the playerDamage callback
|
// Set defined for damage flags used in the playerDamage callback
|
||||||
level.iDFLAGS_RADIUS = 1;
|
level.iDFLAGS_RADIUS = 1;
|
||||||
level.iDFLAGS_NO_ARMOR = 2;
|
level.iDFLAGS_NO_ARMOR = 2;
|
||||||
@ -129,7 +130,7 @@ AbortLevel()
|
|||||||
level.callbackPlayerDamage = ::callbackVoid;
|
level.callbackPlayerDamage = ::callbackVoid;
|
||||||
level.callbackPlayerKilled = ::callbackVoid;
|
level.callbackPlayerKilled = ::callbackVoid;
|
||||||
level.callbackPlayerLastStand = ::callbackVoid;
|
level.callbackPlayerLastStand = ::callbackVoid;
|
||||||
|
|
||||||
setdvar("g_gametype", "dm");
|
setdvar("g_gametype", "dm");
|
||||||
|
|
||||||
exitLevel(false);
|
exitLevel(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user