Hello, i’ve been looking into the UT 4 source code to see how switch weapon was handled and i noticed the following methods:
/** switches weapons; handles client/server sync, safe to call on either side */ UFUNCTION(BlueprintCallable, Category = "Pawn") virtual void SwitchWeapon(AUTWeapon* NewWeapon); /** switches weapon locally, must execute independently on both server and client */ virtual void LocalSwitchWeapon(AUTWeapon* NewWeapon); /** RPC to do weapon switch */ UFUNCTION(Server, Reliable, WithValidation) virtual void ServerSwitchWeapon(AUTWeapon* NewWeapon); UFUNCTION(Client, Reliable) virtual void ClientSwitchWeapon(AUTWeapon* NewWeapon);
Shouldn’t ClientSwitchWeapon be NetMulticast to update all the other simulated clients that the weapon was switched? As it is, it should only run on the owner client (in this case the server) right? So how does he update the other clients?