#[Im Stuck] The simulated proxy sees the wrong weapon swapped
1 messages · Page 1 of 1 (latest)
Try to update but i think it’s not the issue. If it worked before try to roll back to that version
roll back to what version?
It worked on this current version
idk why I thought about updating I just don't have any idea about how to fix this
I meant not UE version, the version of you project
You modified the original code base of the course ?
That’s a good news ))
Than it’s likely the replication issue
yeah probably
just saw that during the solution for my previous bug, I accidentally removed the stuff for reloading locally
maybe thats what is causing the issue
testing
ok
Good news
I almost fixed it
the only problem now
is that the second client sees the wrong weapon when Im swapping, any ideas?
here it was LocallyReloading() instead of LocallyControlled() ok I will see if thats the problem
nope
its not
but I will keep searching
lets see
its not really related to the problem
but
I will check if it works anyway
nope
ok\
more searching
added this
maybe its the problem
at least the animation aspect of that
ok
1 step closer!
the animation stuff is fixed
now I just need to figure out the solution about the wrong weapon swapping for the other client (not a locally controlled client)
Saw the whole lecture again and still, I have the problem
so does anyone want to help please?
is your simulated proxy seeing the new weapon in the hand and then seeing the swap animation? that's the problem I'm having at the moment!
Yes but then after I swap I get the wrong weapon because I’m already with the new one
Actually
When I will be home I will send a video that it will be clearer about what my problem is after some fixes
it's like your sim proxy is calling swap weapon twice
hmm i'm not sure, but on that 3rd time you swapped weapons, it swapped and immediately swapped back, then causing the issue
I'm calling it twice
Something from my previous problem
and here
but I call it in 2 different cases
I will debug
lol when I'm on debug mode its swapping to the right weapon on the simulated proxy, when I'm out of it the sim proxy gets the wrong weapon
ok I have literally no idea it calls SwapWeapon() just once and when I continue after the breakpoint it swapping to the right weapon.
When I dont have a breakpoint or im just running the game its not working (swaps to the wrong weapon)
Any idea?
the only difference I have is that I call Combat->SwapWeapons() above PlaySwapMontage() , but mine doesn't work for sim proxies so unfortunately I have no idea 😦
yeah, I noticed my clients were swapping weapons THEN playing the montage, so I called the swap weapon function and it works correctly now
it's just simulated proxies that are still having that issue, seeing the change of weapon before to montage has played
so you are calling SwapWeapon() also on the client?
I thought only the server needs to handle it
I am yeah, the client was swapping weapons before the montage, so was holding the new weapon when it hadn't swapped yet, this seemed to fix that issue
Did you call the server RPC first?
before the local player logic
I don’t think we have the same issue for me is the simulated proxy see the wrong weapon swapping on the client and I have no idea how to fix it.
so does anyone know how to fix this?
When I swap weapons the simulated proxy see the wrong weapon of the client (didn't happen before).
ok
[L209]swap weapons the simulated proxy see the wrong weapon of the client (didn't happen before).
I saw the whole lecture again (174 - SwapWeapons) and I didn't find anything so I guess Im stuck and I have no idea what to do.
Its weird that it doesn't work only on the sim proxy and it works on everything else.
also I have no idea how it worked when I breakpointed the swap function.
so yeah, I need your help people.
3 bugs in a row is funny lol
L209 - When the client swaps weapons the simulated proxy sees the wrong weapon swapped.
When the client swaps weapons the simulated proxy sees the wrong weapon swapped.
The simulated proxy sees the wrong weapon swapped
I added !Character->HasAuthority()
to: ```c++
if (CombatState != ECombatState::ECS_Unoccupied || Character == nullptr || !Character->HasAuthority()) return;
On the `void UCombatComponent::SwapWeapons()` function.
And maybe it's better? I cant tell
Still not working.
I am literally clueless, please help.
[Im Stuck] The simulated proxy sees the wrong weapon swapped
I think I will open a new post and delete this because so much happened that it will be hard for other to understand and help me so yeah I will do this when I will be home.
Hey romiZ, Any solution on this? I'm having this issue too