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

Death animation in Stream In #222

Open
kolor4do opened this issue Nov 11, 2021 · 1 comment
Open

Death animation in Stream In #222

kolor4do opened this issue Nov 11, 2021 · 1 comment

Comments

@kolor4do
Copy link
Contributor

When one dead player is shown to another, the animation is not that of death. I believe this piece of code was made to fix this, but it's not working properly.

public OnPlayerStreamIn(playerid, forplayerid)
{
	// Send ped floor_hit_f
	if (s_IsDying[playerid]) {
		SendLastSyncPacket(playerid, forplayerid, .animation = 0x2e040000 + 1150);
	}

	return WC_OnPlayerStreamIn(playerid, forplayerid);
}
@NexiusTailer
Copy link
Contributor

NexiusTailer commented Sep 18, 2022

Seems I found the cause: SendLastSyncPacket doesn't set any animations at all if send it on any player (and no matter which anim ID I was trying to set with it). This is not Pawn.RakNet nor SKY implementation fault, because it doesn't work on both, so I doubt it needs to open an issue in SKY repo. I think native SendDeath will work to show a dead player for others (could be also done in Pawn.RakNet implementation), but I suppose Slice initially not used it because weapon-config can cancel any serverside death (for example, if you were killed by a player who used C-bug and it wasn't allowed, your death will be cancelled and health/armour will be restored). So, pretty doubtful that SendDeath can be cancelled for others as simple as it's now just by doing ClearAnimations for this "dead" player.

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