Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
geckoo

a strange bug

Question

Hi folks! Again I need your help to solve a strange problem with which I have lost many time trying different methods without good result. I try to expose you this bug. When a player dies, code waits 5 seconds and after it, player respawns. It works fine, but server (the player who hosts game) see this "last" player during a split second - a fragment, just before his respawn - same position, same weapon. I think there is a delay between information on the server and this function to others. Maybe it create this bug. Please see parts of my code and say me if you find some trouble. Thank you for your help ++

 

This function follows the player during game and helps me to erase "dead" body which is replaced by a RagDoll sequence.

Please login or register to see this code.

My RPC function to respawn

Please login or register to see this code.

This function does the respawn and send info to each player

Please login or register to see this code.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Please don't use GaneObject.Find, it's really bad for performance and will cause delays with things will it tries to find them, just assign the variables in the editor and save the prefab, that alone may fix the issue

Share this post


Link to post
Share on other sites

  • 0

Do you think it's just a question of performance?

Ok I understand. I will try soon.
Thank for your help. Perhaps you have found what is wrong in this code ++

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...