mirror of
https://github.com/ineedbots/t6_bot_warfare.git
synced 2025-04-22 17:45:43 +00:00
fix disablecac
This commit is contained in:
parent
5884d1064b
commit
c5cf283262
Binary file not shown.
@ -590,10 +590,31 @@ connected()
|
|||||||
|
|
||||||
self thread teamWatch();
|
self thread teamWatch();
|
||||||
self thread classWatch();
|
self thread classWatch();
|
||||||
|
self thread onBotSpawned();
|
||||||
|
|
||||||
self thread setPrestige();
|
self thread setPrestige();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
When the bot spawns
|
||||||
|
*/
|
||||||
|
onBotSpawned()
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
self waittill( "spawned_player" );
|
||||||
|
|
||||||
|
waittillframeend;
|
||||||
|
|
||||||
|
self.bot_first_spawn = undefined;
|
||||||
|
|
||||||
|
if ( randomInt( 100 ) < 2 )
|
||||||
|
self.bot_change_class = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Set pres
|
Set pres
|
||||||
*/
|
*/
|
||||||
@ -656,6 +677,17 @@ classWatch()
|
|||||||
*/
|
*/
|
||||||
chooseRandomClass()
|
chooseRandomClass()
|
||||||
{
|
{
|
||||||
|
if ( level.disablecac )
|
||||||
|
{
|
||||||
|
classes = [];
|
||||||
|
classes[classes.size] = "class_assault";
|
||||||
|
classes[classes.size] = "class_smg";
|
||||||
|
classes[classes.size] = "class_lmg";
|
||||||
|
classes[classes.size] = "class_cqb";
|
||||||
|
classes[classes.size] = "class_sniper";
|
||||||
|
return PickRandom( classes );
|
||||||
|
}
|
||||||
|
|
||||||
return PickRandom( self maps\mp\bots\_bot::bot_build_classes() );
|
return PickRandom( self maps\mp\bots\_bot::bot_build_classes() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user