Page MenuHomeWildfire Games

[NetServer] Split `OnInGame` function
ClosedPublic

Authored by Imarok on May 22 2018, 10:10 AM.

Details

Summary

It makes sense and there also was a TODO about that.

Test Plan

Verify the behaviour is the same as before and all relevant code was copied. Agree on the new function names

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Imarok created this revision.May 22 2018, 10:10 AM
Vulcan added a subscriber: Vulcan.May 22 2018, 10:17 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/547/display/redirect

vladislavbelov added inline comments.
source/network/NetServer.cpp
1110 ↗(On Diff #6618)

static_cast here and below.

Imarok marked an inline comment as done.Nov 10 2018, 10:10 PM
Imarok added inline comments.
source/network/NetServer.cpp
1110 ↗(On Diff #6618)

If we decide to do that, we should do it consistently in all the network files.
That means change about 80-200 lines

elexis accepted this revision.Nov 12 2018, 5:17 PM
elexis added a subscriber: elexis.

Yes, this split is overdue! There is nothing else to split, all lines that I read are copy&pasted correctly, I hope the other ones are copy&pasted correctly too, variable and function names are ideal.

source/network/NetServer.cpp
1126 ↗(On Diff #6618)

(I was wondering if we shouldn't cache that, but probably not really changing the performance as a simulation command takes so much more performance and we may want to support changing some settings dynamically eventually)

This revision is now accepted and ready to land.Nov 12 2018, 5:17 PM
This revision was automatically updated to reflect the committed changes.