Varlock wrote:
> 
>     Those are the only two options I can think of. The whole problem stems
> from the client-side weapons and the shared weapons files. Before, when the
> weapons were server-side only, there was no problem. But if I don't
> propagate the CVAR to the client (mp_aquashotgun), it might show the
> animation for firing under water when really the server won't allow it or
> vice versa.
>     Anyone! Valve! There MUST be a way to somehow go about doing this. I'm
> missing it, but I hope you can point it out! It's been a problem for me for
> over a month now, and I still haven't found a solution. I will be very
> thankful to the kind soul who can solve this problem.

Sorry, I can't offer you a solution since I don't know enough
about client programming. But I can share my thoughts. To retrieve
the information from the server you should go and have a look at
the code of Vasily's clientbot code. He found a way to get the
setting of the C4 timer in CS from the server to use it on the
client.

If you go for solution 2 I don't quite understand what your
problem is. How you access your variable depends on how you need
to use it. The quick and dirty way would be to create a global
variable. That can be set when receiving the custom message and
can be read by the weapon code. Not the preferred method, though.
It would be better to wrap it into either a class for a global
object or into the weapon class itself. If you put it into the
weapon class you would define it as a static member which is
shared between all objects of that class so that you have to set
it only once. Give the class an access function so that it can be
set from the outside without making the variable a public member.

Florian.
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to