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

Functions

 main ()

Variables

 ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
dict DEFAULT_BINARY = {115: 'build/check-linux-10/cod2_lnxded', 118: 'build/check-linux/cod2_lnxded'}
str LEVEL_SCRIPT

Detailed Description

Runs the script builtins that read animations, through a test mod.

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

Writes a mod in a temporary home folder whose maps/mp/<map>.gsc calls
getanimlength, animhasnotetrack, getmovedelta and getangledelta on a
multiplayer animation, starts the server on it, and checks that the map
loads, the server keeps answering and no crash report is written. These
builtins call Scr_GetAnim, which returns a struct by value.

Function Documentation

◆ main()

anim_builtins_test.main ( )

Variable Documentation

◆ DEFAULT_BINARY

dict anim_builtins_test.DEFAULT_BINARY = {115: 'build/check-linux-10/cod2_lnxded', 118: 'build/check-linux/cod2_lnxded'}

◆ LEVEL_SCRIPT

str anim_builtins_test.LEVEL_SCRIPT
Initial value:
1= '''#using_animtree("multiplayer");
2
3main()
4{
5 length = getanimlength(%pt_stand_shoot);
6 hasnote = animhasnotetrack(%pt_stand_shoot, "end");
7 move = getmovedelta(%pt_stand_shoot, 0, 1);
8 angle = getangledelta(%pt_stand_shoot, 0, 1);
9 logprint("animtest " + length + "\\n");
10}
11'''

◆ ROOT

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