#Ability Time lasts a different amount of time host vs client
16 messages · Page 1 of 1 (latest)
your times are only decreased via a command to the server?
yes. only thing that touches duration is the 1 command. Debugs show that the duration is correctly firing for both client and host, but the actual affect only last half the time on the cleint.
question is why is it only on a command, it means if the client does not send anything command to the server, the server does not calculate any cooldown
the command calcs cooldown, but i just realized.... the command sends every frame, which is terrible logic
and if it's in a command, how does the client calculate its own cooldown?
cooldown time is syncvar
I am not sure why the cooldown time is 1/2 the time on the client.
But maybe you should not syncar the cooldown/active times
make these all server only context
and make the ability state a sycvar instead
and do the timechecks in update() which should be a servercallback or if (isServer) CheckTimes()
it's not the cooldown time thats half, but the ability affect that's half.
switching to server only is something i need to add though for sure
Issue was handling all logic through a command firing from client every frame. switched to server only and runs fine
ok, so the ability still has a problem? or...