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

Functions

 main ()

Variables

 ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
dict DEFAULT_CLIENT = {115: 'build/check-linux-10/cod2_linux', 118: 'build/check-linux/cod2_linux'}
int MIN_CASES = 10000
int TIMEOUT = 120

Detailed Description

The client's animation script picks the same animations as the server's.

    python3 scripts/anim_script_test.py /path/to/CoD2 --protocol {115|118} [--binary PATH]

Starts the Linux client on its own game of mp_toujane with
COD2_CHECK_ANIMSCRIPT=1: once cgame has loaded the animation script, the
client runs the engine's playerstate functions (src/PC/bgame, which predict)
and CoD2rev-Plus's (the local server's) on the same playerstates, every
weapon, stance, aim, pitch, firing, state, movetype and event, and prints
"animscript check: N cases, M differ"; before that it compares the parsed
animations' flags, movetypes, durations and speeds (not the note types, which
the server leaves unset). Exits with 0 when at least MIN_CASES
cases ran, no case or animation differs, and the client leaves no crash report. The client
opens a window; it needs no CD key.

Function Documentation

◆ main()

anim_script_test.main ( )

Variable Documentation

◆ DEFAULT_CLIENT

dict anim_script_test.DEFAULT_CLIENT = {115: 'build/check-linux-10/cod2_linux', 118: 'build/check-linux/cod2_linux'}

◆ MIN_CASES

int anim_script_test.MIN_CASES = 10000

◆ ROOT

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

◆ TIMEOUT

int anim_script_test.TIMEOUT = 120