mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-05-11 14:44:51 +00:00
added dvars
This commit is contained in:
parent
31691c73b8
commit
537911e91a
@ -98,7 +98,8 @@ bot_give_loadout()
|
|||||||
|
|
||||||
|
|
||||||
self takeAllWeapons();
|
self takeAllWeapons();
|
||||||
self GiveWeapon( "knife_mp" );
|
if (getDvarInt("bots_play_knife"))
|
||||||
|
self GiveWeapon( "knife_mp" );
|
||||||
|
|
||||||
weap = self.pers["bot"]["class_primary"];
|
weap = self.pers["bot"]["class_primary"];
|
||||||
if(weap == "")
|
if(weap == "")
|
||||||
@ -116,12 +117,23 @@ bot_give_loadout()
|
|||||||
if ( self hasPerk( "specialty_extraammo" ) )
|
if ( self hasPerk( "specialty_extraammo" ) )
|
||||||
self giveMaxAmmo( weap );
|
self giveMaxAmmo( weap );
|
||||||
|
|
||||||
|
if (!getDVarint("bots_play_fire"))
|
||||||
|
{
|
||||||
|
self SetWeaponAmmoClip(weap, 0);
|
||||||
|
self SetWeaponAmmoStock(weap, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if(self.pers["bot"]["class_secondary"] != "")
|
if(self.pers["bot"]["class_secondary"] != "")
|
||||||
{
|
{
|
||||||
self GiveWeapon( self.pers["bot"]["class_secondary"], 0, int( self.pers["bot"]["class_secondary_opts"] ) );
|
self GiveWeapon( self.pers["bot"]["class_secondary"], 0, int( self.pers["bot"]["class_secondary_opts"] ) );
|
||||||
if ( self hasPerk( "specialty_extraammo" ) )
|
if ( self hasPerk( "specialty_extraammo" ) )
|
||||||
self giveMaxAmmo( self.pers["bot"]["class_secondary"] );
|
self giveMaxAmmo( self.pers["bot"]["class_secondary"] );
|
||||||
|
|
||||||
|
if (!getDVarint("bots_play_fire"))
|
||||||
|
{
|
||||||
|
self SetWeaponAmmoClip(self.pers["bot"]["class_secondary"], 0);
|
||||||
|
self SetWeaponAmmoStock(self.pers["bot"]["class_secondary"], 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self SetActionSlot( 3, "altMode" );
|
self SetActionSlot( 3, "altMode" );
|
||||||
|
@ -139,11 +139,29 @@ bot_on_spawn()
|
|||||||
self.bot_lock_goal = false;
|
self.bot_lock_goal = false;
|
||||||
self.help_time = undefined;
|
self.help_time = undefined;
|
||||||
self.bot_was_follow_script_update = undefined;
|
self.bot_was_follow_script_update = undefined;
|
||||||
|
self thread bot_watch_stop_move();
|
||||||
|
|
||||||
self thread bot_spawn();
|
self thread bot_spawn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
BOt stop moving on dvar
|
||||||
|
*/
|
||||||
|
bot_watch_stop_move()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
self endon("death");
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
if (!getDvarInt("bots_play_move"))
|
||||||
|
self thread botStopMove(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Fired when the bot is damaged
|
Fired when the bot is damaged
|
||||||
*/
|
*/
|
||||||
@ -2310,7 +2328,7 @@ bot_weapon_think()
|
|||||||
if(weap == "")
|
if(weap == "")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
self SwitchToWeapon(weap);
|
self thread changeToWeapon(weap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +65,12 @@ init()
|
|||||||
setDvar("bots_play_killstreak", true);
|
setDvar("bots_play_killstreak", true);
|
||||||
if(getDvar("bots_play_nade") == "")//bots grenade
|
if(getDvar("bots_play_nade") == "")//bots grenade
|
||||||
setDvar("bots_play_nade", true);
|
setDvar("bots_play_nade", true);
|
||||||
|
if(getDvar("bots_play_knife") == "")//bots knife
|
||||||
|
setDvar("bots_play_knife", true);
|
||||||
|
if(getDvar("bots_play_fire") == "")//bots fire
|
||||||
|
setDvar("bots_play_fire", true);
|
||||||
|
if(getDvar("bots_play_move") == "")//bots move
|
||||||
|
setDvar("bots_play_move", true);
|
||||||
if(getDvar("bots_play_take_carepackages") == "")//bots take carepackages
|
if(getDvar("bots_play_take_carepackages") == "")//bots take carepackages
|
||||||
setDvar("bots_play_take_carepackages", true);
|
setDvar("bots_play_take_carepackages", true);
|
||||||
if(getDvar("bots_play_obj") == "")//bots play the obj
|
if(getDvar("bots_play_obj") == "")//bots play the obj
|
||||||
|
Loading…
x
Reference in New Issue
Block a user