mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-22 16:05:44 +00:00
ok update to date with cod4
This commit is contained in:
parent
465c917248
commit
cef1ee2a66
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
level.bw_VERSION = "1.0.0";
|
level.bw_VERSION = "2.0.0";
|
||||||
|
|
||||||
if(getDvar("bots_main") == "")
|
if(getDvar("bots_main") == "")
|
||||||
setDvar("bots_main", true);
|
setDvar("bots_main", true);
|
||||||
@ -59,6 +59,25 @@ init()
|
|||||||
if(getDvar("bots_loadout_allow_op") == "")//allows jug, marty and laststand
|
if(getDvar("bots_loadout_allow_op") == "")//allows jug, marty and laststand
|
||||||
setDvar("bots_loadout_allow_op", true);
|
setDvar("bots_loadout_allow_op", true);
|
||||||
|
|
||||||
|
if(getDvar("bots_play_move") == "")//bots move
|
||||||
|
setDvar("bots_play_move", 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_nade") == "")//bots grenade
|
||||||
|
setDvar("bots_play_nade", true);
|
||||||
|
if(getDvar("bots_play_obj") == "")//bots play the obj
|
||||||
|
setDvar("bots_play_obj", true);
|
||||||
|
if(getDvar("bots_play_camp") == "")//bots camp and follow
|
||||||
|
setDvar("bots_play_camp", true);
|
||||||
|
if(getDvar("bots_play_jumpdrop") == "")//bots jump and dropshot
|
||||||
|
setDvar("bots_play_jumpdrop", true);
|
||||||
|
if(getDvar("bots_play_target_other") == "")//bot target non play ents (vehicles)
|
||||||
|
setDvar("bots_play_target_other", true);
|
||||||
|
if(getDvar("bots_play_killstreak") == "")//bot use killstreaks
|
||||||
|
setDvar("bots_play_killstreak", true);
|
||||||
|
|
||||||
level.defuseObject = undefined;
|
level.defuseObject = undefined;
|
||||||
level.bots_smokeList = List();
|
level.bots_smokeList = List();
|
||||||
level.tbl_PerkData[0]["reference_full"] = true;
|
level.tbl_PerkData[0]["reference_full"] = true;
|
||||||
|
@ -338,6 +338,22 @@ isArtShocked()
|
|||||||
return (isDefined(self.beingArtilleryShellshocked) && self.beingArtilleryShellshocked);
|
return (isDefined(self.beingArtilleryShellshocked) && self.beingArtilleryShellshocked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
If the player is carrying a bomb
|
||||||
|
*/
|
||||||
|
isBombCarrier()
|
||||||
|
{
|
||||||
|
return (isDefined(self.isBombCarrier) && self.isBombCarrier);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
If the site is in use
|
||||||
|
*/
|
||||||
|
isInUse()
|
||||||
|
{
|
||||||
|
return (isDefined(self.inUse) && self.inUse);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns a valid grenade launcher weapon
|
Returns a valid grenade launcher weapon
|
||||||
*/
|
*/
|
||||||
@ -414,6 +430,53 @@ GetEyePos()
|
|||||||
return self getTagOrigin("tag_eye");
|
return self getTagOrigin("tag_eye");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Taken from iw4 script
|
||||||
|
*/
|
||||||
|
waittill_any_timeout( timeOut, string1, string2, string3, string4, string5 )
|
||||||
|
{
|
||||||
|
if ( ( !isdefined( string1 ) || string1 != "death" ) &&
|
||||||
|
( !isdefined( string2 ) || string2 != "death" ) &&
|
||||||
|
( !isdefined( string3 ) || string3 != "death" ) &&
|
||||||
|
( !isdefined( string4 ) || string4 != "death" ) &&
|
||||||
|
( !isdefined( string5 ) || string5 != "death" ) )
|
||||||
|
self endon( "death" );
|
||||||
|
|
||||||
|
ent = spawnstruct();
|
||||||
|
|
||||||
|
if ( isdefined( string1 ) )
|
||||||
|
self thread waittill_string( string1, ent );
|
||||||
|
|
||||||
|
if ( isdefined( string2 ) )
|
||||||
|
self thread waittill_string( string2, ent );
|
||||||
|
|
||||||
|
if ( isdefined( string3 ) )
|
||||||
|
self thread waittill_string( string3, ent );
|
||||||
|
|
||||||
|
if ( isdefined( string4 ) )
|
||||||
|
self thread waittill_string( string4, ent );
|
||||||
|
|
||||||
|
if ( isdefined( string5 ) )
|
||||||
|
self thread waittill_string( string5, ent );
|
||||||
|
|
||||||
|
ent thread _timeout( timeOut );
|
||||||
|
|
||||||
|
ent waittill( "returned", msg );
|
||||||
|
ent notify( "die" );
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Used for waittill_any_timeout
|
||||||
|
*/
|
||||||
|
_timeout( delay )
|
||||||
|
{
|
||||||
|
self endon( "die" );
|
||||||
|
|
||||||
|
wait( delay );
|
||||||
|
self notify( "returned", "timeout" );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns if we have the create a class object unlocked.
|
Returns if we have the create a class object unlocked.
|
||||||
*/
|
*/
|
||||||
@ -1544,7 +1607,7 @@ AStarSearch(start, goal, team, greedy_path)
|
|||||||
|
|
||||||
// have certain types of nodes more expensive
|
// have certain types of nodes more expensive
|
||||||
if (childtype == "climb" || childtype == "prone")
|
if (childtype == "climb" || childtype == "prone")
|
||||||
penalty++;
|
penalty += 4;
|
||||||
|
|
||||||
//calc the total path we have took
|
//calc the total path we have took
|
||||||
newg = bestNode.g + DistanceSquared(nodeorg, childorg)*penalty;//bots on same team's path are more expensive
|
newg = bestNode.g + DistanceSquared(nodeorg, childorg)*penalty;//bots on same team's path are more expensive
|
||||||
|
Loading…
x
Reference in New Issue
Block a user