Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation start/end hooks #58

Closed
moveaxebx opened this issue Jan 31, 2021 · 1 comment
Closed

Animation start/end hooks #58

moveaxebx opened this issue Jan 31, 2021 · 1 comment

Comments

@moveaxebx
Copy link

Do you know any function that can be used for hooks:
OnUnitAnimationStart (C_BaseEntity *, animation_name)
and
OnUnitAnimationEnd (C_BaseEntity *)?

I spent a lot of time searching but couldn't find anything better than C_TEUnitAnimation :: RunUnitAnimation
but the problem is that it doesn't work for some abilities. (sf razes, axe call )

@LWSS
Copy link
Owner

LWSS commented Jan 31, 2021

the animations are actually a packet sent from the server->client.

animation start
message CDOTAUserMsg_TE_UnitAnimation {
	optional int32 entity = 1;
	optional int32 sequenceVariant = 2;
	optional float playbackrate = 3;
	optional float castpoint = 4;
	optional int32 type = 5;
	optional int32 activity = 6;
}

animation cancel
message CDOTAUserMsg_TE_UnitAnimationEnd {
	optional int32 entity = 1;
	optional bool snap = 2;
}

easiest to intercept it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants