Air drop changes for chat

This commit is contained in:
ineed bots 2022-04-19 16:41:29 -06:00
parent c372229b6a
commit 5392d3152e
3 changed files with 35 additions and 33 deletions

View File

@ -366,9 +366,6 @@ addNotifyOnAirdrops_loop()
{
airdrop = dropCrates[i];
if ( !isDefined( airdrop.owner ) )
continue;
if ( isDefined( airdrop.doingPhysics ) )
continue;
@ -398,6 +395,8 @@ doNotifyOnAirdrop()
self waittill( "physics_finished" );
self.doingPhysics = false;
if ( isDefined( self.owner ) )
self.owner notify( "crate_physics_done" );
self thread onCarepackageCaptured();

View File

@ -170,6 +170,7 @@ start_killed_watch()
start_chat_watch()
{
self endon( "disconnect" );
level endon ( "game_ended" );
for ( ;; )
{
@ -930,8 +931,6 @@ bot_chat_streak( streakCount )
self endon( "disconnect" );
if ( streakCount == 25 )
{
if ( GetDvarInt( "bots_loadout_allow_op" ) )
{
if ( self.pers["lastEarnedStreak"] == "nuke" )
{
@ -960,11 +959,9 @@ bot_chat_streak( streakCount )
}
else
{
if ( GetDvarInt( "bots_loadout_allow_op" ) )
self BotDoChat( 100, "Come on! I would of had a nuke but I don't got it set..." );
}
}
else
{
self BotDoChat( 100, "WOW.. I could have a nuke but dumb admin disabled it for bots." );
}
}
@ -977,6 +974,9 @@ bot_chat_killed_watch( victim )
{
self endon( "disconnect" );
if ( !isDefined( victim ) || !isDefined( victim.name ) )
return;
message = "";
switch ( randomint( 42 ) )
@ -1163,6 +1163,9 @@ bot_chat_death_watch( killer, last_ks )
{
self endon( "disconnect" );
if ( !isDefined( killer ) || !isDefined( killer.name ) )
return;
message = "";
switch ( randomint( 68 ) )
@ -1771,7 +1774,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
switch ( randomint( 2 ) )
{
case 0:
if ( aircare.owner == self )
if ( !isDefined( aircare.owner ) || aircare.owner == self )
self BotDoChat( 5, "going to my carepackage" );
else
self BotDoChat( 5, "going to " + aircare.owner.name + "'s carepackage" );
@ -1789,7 +1792,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
switch ( randomint( 2 ) )
{
case 0:
if ( aircare.owner == self )
if ( !isDefined( aircare.owner ) || aircare.owner == self )
self BotDoChat( 15, "taking my carepackage" );
else
self BotDoChat( 15, "taking " + aircare.owner.name + "'s carepackage" );
@ -1804,7 +1807,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
break;
case "stop":
if ( aircare.owner == self )
if ( !isDefined( aircare.owner ) || aircare.owner == self )
{
switch ( randomint( 6 ) )
{

View File

@ -3891,7 +3891,7 @@ bot_crate_think_loop( data )
waitTime = 3;
if ( isDefined( crate.owner ) && crate.owner == self )
if ( !isDefined( crate.owner ) || crate.owner == self )
waitTime = 0.5;
crate waittill_notify_or_timeout( "captured", waitTime );