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

Explosion is not networked properly #627

Closed
crabmusket opened this issue Apr 23, 2014 · 5 comments
Closed

Explosion is not networked properly #627

crabmusket opened this issue Apr 23, 2014 · 5 comments
Milestone

Comments

@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Apr 23, 2014

This issue has persisted for a long time. Creating an Explosion on the server, using this function for example, will not create the explosion for any clients.

Solution: either make Explosion work as expected, provide a utility function to do so easily, or at the very least remove that example in explosion.cpp.

EDIT: Decided that this is a documentation issue. Will be resolved for 3.6.

@andr3wmac
Copy link
Contributor

@andr3wmac andr3wmac commented Apr 23, 2014

I ran into this issue. If you look at it again createExplosion doesn't actually exist, it's just an example of a function that shows how to create an explosion. It also makes no mention of automatically ghosting or being sent to other clients.

It's for this reason, and from reading through the code, that I concluded it's only intended to be spawned client side, like playing a sound. This doesn't mean the issue doesn't still exist though. I decided to solve it the same way sounds were handled:
https://gist.github.com/andr3wmac/11208941

So if you want to play an explosion, like a sound, you use ServerPlayExplosion();

@Areloch
Copy link
Contributor

@Areloch Areloch commented Apr 23, 2014

If you look at the Explosion class, it declares IsGhost. It's designed around being on the clients.

I'd say Andrew's solution looks like it would work well enough.

@dottools
Copy link

@dottools dottools commented Apr 23, 2014

Definitely not a bug. Reviewing the source code it shows that it was designed to be used on client-side only as only its datablock ExplosionData is networked and ghosted, while the explosion is suppose to be used by particle effects and what not. It isn't suppose to be used independently server side.

@crabmusket
Copy link
Contributor Author

@crabmusket crabmusket commented Apr 23, 2014

Ok, good answers. It still seems to me that the documentation implies it can be used as a regular object and ghosted. IMO we should fix that doc string to contain Andrew's example.

@crabmusket
Copy link
Contributor Author

@crabmusket crabmusket commented Apr 25, 2014

Added @andr3wmac's code to the docs. Incidentally, writing TS examples in the source is shite.

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

No branches or pull requests

4 participants