Open allisaurus opened 2 years ago
Functionality has been fixed. @allisaurus is this still worth keeping open?
Not sure whether the current implementation is still using the "workaround" (directly implementing PlayerMatchLifecycleBus::Handler
vs. calling RPC), I'd say worth keeping open until the correct approach is validated
Describe the bug During the course of trying to implement https://github.com/o3de/o3de-multiplayersample/issues/148 , could not get player position/armor/coin updates to take effect via call to Server-->Authority RPC on
NetworkMatchComponent
. However, the same logic does work when the corresponding controller directly implementsPlayerMatchLifecycleBus::Handler
Steps to reproduce Steps to reproduce the behavior:
ctrl + g
to play game, stand in front of energy cannon to deplete armor.NetworkMatchComponent::OnPlayerArmorZero(...)
fires and callsRPC_PlayerArmorZero(playerEntity)
Expected behavior Player would respawn with full health and diminished coins on call to
HandleRPC_PlayerArmorZero()
screenshot of log of handle method firing on server![image](https://user-images.githubusercontent.com/34254888/185968486-af154dd0-9e2e-4f3e-80a9-2816f52d5f4f.png)
Actual behavior Player doesn't respawn and to effects to player resources are observed.
Assets required Code that repros problem here: https://github.com/allisaurus/o3de-multiplayersample/commits/respawn-rpc
Found in Branch built off of https://github.com/aws-lumberyard-dev/o3de-multiplayersample/tree/GameJam_2022_07
Desktop/Device (please complete the following information):
Additional context A similar call pattern is made in response to
PlayerActivate
in this component and seems to work. Unclear if there's a substantive difference in event origin or anything else that'd make this call path different in some way.