OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
Loading...
Searching...
No Matches
bots_test Namespace Reference

Functions

 stock_defuse_race (lines)
 wait_lines (path, pattern, count, seconds)
 main ()

Variables

 ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
str MOD = 'bottest'
str ERROR_CALLBACK
str HOOK = 'thread maps\\mp\\bots\\_bots::init();'
str SD_SCRIPT = 'maps/mp/gametypes/sd.gsc'

Detailed Description

Runs the bots mod on a real map and checks that the bots navigate and fight.

    python3 scripts/bots_test.py /path/to/CoD2 [--map mp_toujane] [--seconds 180]

The mod is installed in a temporary folder with bots_debug 1, so it writes
BOTNAV and BOTCOMBAT lines to games_mp.log. The map is loaded twice: the first
load must build and save the waypoint graph, the second must read it back.
Exits with 0 when every check passes.

Function Documentation

◆ main()

bots_test.main ( )

◆ stock_defuse_race()

bots_test.stock_defuse_race ( lines)
Indexes of the errors stock sd.gsc raises when the defuser dies on the
last tick of a defuse: it still defuses, then destroys the progress bars
the death already removed (sd.gsc lines 1925 and 1926). A stock bug, about
one SD run in twenty.

◆ wait_lines()

bots_test.wait_lines ( path,
pattern,
count,
seconds )

Variable Documentation

◆ ERROR_CALLBACK

str bots_test.ERROR_CALLBACK

◆ HOOK

str bots_test.HOOK = 'thread maps\\mp\\bots\\_bots::init();'

◆ MOD

str bots_test.MOD = 'bottest'

◆ ROOT

bots_test.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

◆ SD_SCRIPT

str bots_test.SD_SCRIPT = 'maps/mp/gametypes/sd.gsc'