I digged some time through the animation functions and I could set a new animation, but it was instantly resetted. Maybe this helps you to look further without redoing whats already done.
libcod, for version 1.3 iirc:
https://github.com/kungfooman/libcod...bcod.cpp#L1920PHP Code:
int BG_AnimationIndexForString(char *string) { ... }
BG_PlayAnim e.g. I just hooked to look what arguments it receives. Just play a bit around with it or add a hook to dump the arguments and still execute the original function.
The actual function calls for testing this animation stuff is here: https://github.com/kungfooman/libcod/blob/master/gsc.cpp#L1935
I was calling the closer functions by abusing a cvar, with this: https://github.com/kungfooman/cod2_s...ugging.gsc#L10
PHP Code:
/rcon set closer "1100,first,second,third arg"
Today I would probably use call_function_raw though: http://killtube.org/showthread.php?2...-dlsym-dlclosePHP Code:
// ps animIndex bodyPart is_0/time setTimer, isContinue, force
case 1100: return stackPushInt(BG_PlayAnim(0x08705480, 0x00000118, 0x00000002, 0x00/*000567*/, 1, 0, 1)); // reload
case 1101: return stackPushInt(BG_PlayAnim(0x08705480, 0x00000082, 0x00000003, 0x00/*000037*/, 1, /*0*/1, 1)); // strafejump
case 1102: return stackPushInt(BG_PlayAnim(0x08705480, 0x00000083, 0x00000003, 0x00/*000037*/, 1, 0, 1)); // oO 1
case 1103: return stackPushInt(BG_PlayAnim(0x08705480, 0x00000080, 0x00000003, 0x00/*000037*/, 1, 0, 1)); // oO 2
case 1104: return stackPushInt(BG_PlayAnim(0x08705480, 0x00000000, 0x00000002, 0x00/*001000*/, 1, 1, 1)); // nothing
case 1105: return stackPushInt(BG_PlayAnim(0x08705480, 0x00000085, 0x00000003, 0x00/*000600*/, 1, 1, 1)); // highjump
case 1106: return stackPushInt(BG_PlayAnim(0x08705480, 0x00000081, 0x00000003, 0x00/*000037*/, 1, 1, 1)); // highjump
case 1107: return stackPushInt(BG_PlayAnim(0x08705480, 6, 0x00000003, 0x00/*000037*/, 1, 1, 1));
That makes it a lot faster, no need to recompile libcod and restart the server everytime etc.
In php's CoDExtended, get_animation_index(name):
https://github.com/riicchhaarrd/CoDE...script.cpp#L16PHP Code:
void GScr_xtnded_anim(int a1) { ... }
{"get_animation_index", GScr_xtnded_anim, 0},