mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Create AnimationEvent with predefined args
This commit is contained in:
parent
11fb5ee2af
commit
8ae15be0de
1 changed files with 4 additions and 3 deletions
|
@ -403,13 +403,14 @@ void Animate::DoExitCommands(int slot)
|
|||
int ii, j;
|
||||
|
||||
for (ii = 0; ii < cmds.num_cmds; ii++) {
|
||||
ev = new AnimationEvent(cmds.cmds[ii].args[0]);
|
||||
tiki_singlecmd_t& single_cmd = cmds.cmds[ii];
|
||||
ev = new AnimationEvent(single_cmd.args[0], single_cmd.num_args);
|
||||
|
||||
ev->SetAnimationNumber(edict->s.frameInfo[slot].index);
|
||||
ev->SetAnimationFrame(0);
|
||||
|
||||
for (j = 1; j < cmds.cmds[ii].num_args; j++) {
|
||||
ev->AddToken(cmds.cmds[ii].args[j]);
|
||||
for (j = 1; j < single_cmd.num_args; j++) {
|
||||
ev->AddToken(single_cmd.args[j]);
|
||||
}
|
||||
|
||||
PostEvent(ev, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue