donofsandiego Posted January 7, 2022 Share Posted January 7, 2022 I've been trying to update a mod that resurrects zombies, and I wanted to give it some new bells and whistles. Primarily, I wanted to fix it so that it works in multiplayer. However, I've run into a very odd situation: Inexplicably, while the mod works perfectly in single player, it only works in multiplayer after having picked up and dropped the corpse of the zombie. I appended a print command to my code in order to check if the code is actually running when the zombie dies (it's based on a OnContainerUpdate event with IsoDeadBody as a parameter) and it does in fact run. Being a beginner in coding, my best guess is eldritch demons, or maybe some particularly well-meaning but nevertheless hindering multiplayer optimization, else spaghetti code. If there's no answer to this question, my next question is: Can you please help me find a way to somehow pick up and drop a zombie after death, but in such a way that it's not noticable to the player? I really don't even know where to begin for this. Any help is appreciated. Thank you!. P.S. - if you need me to include the code for scrutiny, ask and you shall recieve. Link to comment Share on other sites More sharing options...
donofsandiego Posted January 19, 2022 Author Share Posted January 19, 2022 bump Link to comment Share on other sites More sharing options...
ZombiesLoveBrainiacs Posted January 22, 2022 Share Posted January 22, 2022 Just guessing: Reanimation is handled by the server in MP, but you're doing things on the client. The server doesn't know about it. Picking up & dropping the corpse syncs something with the server, so now it knows what to do. So you need to figure out how to make sure that things run on the server at the right time. Easier said than done. Decompiling the java source code always helps with figuring out why something doesn't work. Link to comment Share on other sites More sharing options...
donofsandiego Posted January 25, 2022 Author Share Posted January 25, 2022 On 1/22/2022 at 10:24 AM, ZombiesLoveBrainiacs said: Just guessing: Reanimation is handled by the server in MP, but you're doing things on the client. The server doesn't know about it. Picking up & dropping the corpse syncs something with the server, so now it knows what to do. So you need to figure out how to make sure that things run on the server at the right time. Easier said than done. Decompiling the java source code always helps with figuring out why something doesn't work. Thanks for the response, but that's definitely way above my head. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now