mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2026-10-04 02:05:35 +00:00
built ins
This commit is contained in:
1 parent
e1ba6f94cb
commit
26517d8729
3 files changed
+40
-18
No files matched your search
@@ -242,7 +242,7 @@ doBotMovement_loop( data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// climb through windows
|
// climb through windows
|
||||||
if ( self isMantling() )
|
if ( self BotBuiltinIsMantling() )
|
||||||
{
|
{
|
||||||
data.wasmantling = true;
|
data.wasmantling = true;
|
||||||
self crouch();
|
self crouch();
|
||||||
@@ -262,7 +262,7 @@ doBotMovement_loop( data )
|
|||||||
// check if need to jump
|
// check if need to jump
|
||||||
bt = bullettrace( startPosForward, startPosForward - ( 0, 0, 40 ), false, self );
|
bt = bullettrace( startPosForward, startPosForward - ( 0, 0, 40 ), false, self );
|
||||||
|
|
||||||
if ( bt[ "fraction" ] < 1 && bt[ "normal" ][ 2 ] > 0.9 && data.i > 1.5 && !self isOnLadder() )
|
if ( bt[ "fraction" ] < 1 && bt[ "normal" ][ 2 ] > 0.9 && data.i > 1.5 && !self BotBuiltinIsOnLadder() )
|
||||||
{
|
{
|
||||||
data.i = 0;
|
data.i = 0;
|
||||||
self thread jump();
|
self thread jump();
|
||||||
|
|||||||
@@ -111,6 +111,32 @@ BotBuiltinBotWeapon( weapon )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Test
|
||||||
|
*/
|
||||||
|
BotBuiltinIsMantling()
|
||||||
|
{
|
||||||
|
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "ismantling" ] ) )
|
||||||
|
{
|
||||||
|
return self [[ level.bot_builtins[ "ismantling" ] ]]();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Test
|
||||||
|
*/
|
||||||
|
BotBuiltinIsOnLadder()
|
||||||
|
{
|
||||||
|
if ( isdefined( level.bot_builtins ) && isdefined( level.bot_builtins[ "isonladder" ] ) )
|
||||||
|
{
|
||||||
|
return self [[ level.bot_builtins[ "isonladder" ] ]]();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns if player is the host
|
Returns if player is the host
|
||||||
*/
|
*/
|
||||||
@@ -559,22 +585,6 @@ isSecondaryGrenade( nade )
|
|||||||
return issubstr( nade, "smoke_grenade_" );
|
return issubstr( nade, "smoke_grenade_" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
CoD2
|
|
||||||
*/
|
|
||||||
isMantling()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
CoD2
|
|
||||||
*/
|
|
||||||
isOnLadder()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CoD2
|
CoD2
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ init()
|
|||||||
level.bot_builtins[ "isbot" ] = ::do_isbot;
|
level.bot_builtins[ "isbot" ] = ::do_isbot;
|
||||||
level.bot_builtins[ "botangles" ] = ::do_botangles;
|
level.bot_builtins[ "botangles" ] = ::do_botangles;
|
||||||
level.bot_builtins[ "botweapon" ] = ::do_botweapon;
|
level.bot_builtins[ "botweapon" ] = ::do_botweapon;
|
||||||
|
level.bot_builtins[ "isonladder" ] = ::do_isonladder;
|
||||||
|
level.bot_builtins[ "ismantling" ] = ::do_ismantling;
|
||||||
}
|
}
|
||||||
|
|
||||||
do_printconsole( s )
|
do_printconsole( s )
|
||||||
@@ -178,3 +180,13 @@ do_botweapon( weapon )
|
|||||||
|
|
||||||
// self switchtoweapon( weapon );
|
// self switchtoweapon( weapon );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_ismantling()
|
||||||
|
{
|
||||||
|
return self ismantling();
|
||||||
|
}
|
||||||
|
|
||||||
|
do_isonladder()
|
||||||
|
{
|
||||||
|
return self isonladder();
|
||||||
|
}
|
||||||
Reference in new issue
Block a user