Is there a more "network safe" way to set player flags?

Status
Not open for further replies.

amperbee

thunderdome denizen
I'm messing with the weapon rings. And after some experimenting I was able to do what would make me stay ecstatic for a lot of time: Hold your ring toss button to spam rail rings, like automatic rings!

The problem is in multiplayer. If a weapon has the automatic property enabled and one holds down the attack button, resynching will happen as long as the player has ammunition.

This is the piece of code I believe is causing problems:
XXn8U2Y.png

(The entire code is around 1000 lines long)

"gunflags(<server>, <stat>)" only checks a value in a server variable and returns it.

The code is inside a ThinkFrame hook.

I'm not sure what details should I give to ask for help, but what can I do to make this code avoid trying to resynch when it is called?
 
There shouldn't be anything there not "network safe", quickly checking at a glance ...though I'm curious as to what the gunflags function does exactly.
 
There shouldn't be anything there not "network safe", quickly checking at a glance
I checked my code but I couldn't find anything that would cause the game to desynchronize. But after a while, it just worked alright. It's weird, to say the least.

...though I'm curious as to what the gunflags function does exactly.
4II5Z6r.png

It's just a function that I can reuse anywhere in the code without having to type its contents again and again inside the file.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top