Gaming Zone > Unreal Tournament 2004

Localised Team Switch message

(1/3) > >>

The_Cowboy:
Howdy!

I was wondering if the Equalizer's team switch message (You are on Red/Blue) needs be localised. A well behaved mutator should do that.

Let me know your feelings here!

Piglet:
Hi mate,

I'd not thought of that. I think it has to be doesn't it? Do you think the problem we're seeing is that the client and server are out of line in the value being passed to the class

i.e. is the server value of NewTeam different to the client value of NewTeam?


--- Code: ---Level.Game.BroadcastHandler.BroadcastLocalized(none, Player, class'EQTeamSwitchMessage', NewTeam, Player.PlayerReplicationInfo);
--- End code ---


I really get confused as to what is on client and what is on server. One of these days I'm going to have to work through it!

The_Cowboy:
So the code you quoted is executed on Server. Basically the function calls all the boradcast handlers in the chain and executes the function
ReceiveLocalizedMessage (https://ericdives.com/UT2004-UnCodex/engine/playercontroller.html#_ReceiveLocalizedMessage-) in the PlayerController class (note: still on server).

Now the function is declared in the Replication block (line #374 https://ericdives.com/UT2004-UnCodex/Source_engine/playercontroller.html#374) of the class, meaning, it shall be executed on the client. So, naturally, all the arguments gonna replicate to the client, and unless there is some flipflop of bytes during so, the team-to-switch-to variable (NewTeam) shouldn't flip.

That'd result in appropriate teamchange message and sound!

Piglet:
Ok. In practice we're hearing the wrong sound. I don't know what message is being generated in that circumstance,

On my test server I only have one player - but it doesn't happen if I'm on blue at the start and get switched to red. I can't reproduce it.

The_Cowboy:
hmm, I asked eveyone to check the sound, but go no response from them.

Personally I am receiving correct sounds!

Navigation

[0] Message Index

[#] Next page

Go to full version