View Issue Details

IDProjectCategoryView StatusLast Update
0002940FSSCPPilot datapublic2014-05-25 10:28
Reporterniffiwan Assigned Toniffiwan  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.7.1 
Target Version3.7.2 
Summary0002940: multi stats are not saved
DescriptionSee summary
Steps To ReproduceGo to barracks, check stats
Start a multiplayer game as the server
Play a mission
Complete it successfully
Accept stats
Go to barracks, observe that stats have not changed
Additional Informationmission used for testing was a trivial one, no events, no hostile ships, just used primary shots fired count as the measure of stats not being saved
TagsNo tags attached.

Relationships

related to 0002906 resolvedniffiwan Pilot cloned with stats from previous pilot 
parent of 0002923 resolvedniffiwan New pilot code has no backout option for all-time stats 

Activities

FUBAR-BDHR

2013-10-21 16:38

developer   ~0015339

Multi stats are only supposed to be updated if PXO validation succeeds. They will never save if you play a mission by yourself or play unvalidated missions.

niffiwan

2013-10-21 19:54

developer   ~0015340

hmm? I tested with 3.6.18 and multi stats were saved?

And if you're correct, it's going to be a right pain to test the stats-backout in the related ticket :|

FUBAR-BDHR

2013-10-21 20:33

developer   ~0015341

They may have appeared to have been saved but even if they were the next time you connected to FS2netD it should have overwrote them with the ones stored there.

niffiwan

2013-10-22 02:41

developer   ~0015342

A player can play multi without connecting to PXO, so the multi_stats still should be saved to handle that case.

I'll get around to testing PXO stats... later. Do you know of any short validated missions?

FUBAR-BDHR

2013-10-22 03:31

developer   ~0015343

Well any multi can mission can be short. Shoot a couple of targets and jump. TvT has to go at least so long (I think 2 minutes) for stats to not get tossed. As long as it says stats saved in the debriefing you should be good to go.

niffiwan

2013-11-06 08:59

developer   ~0015386

Last edited: 2013-11-07 08:33

ahahaha... so, I just tried to connect 2 computers to fs2netd from behind the same router. It doesn't seem to work, the 2nd computer was disconnected from the lobby on joining and neither computer could see games created by the other one. They showed up on http://fs2netd.game-warden.com/?area=activegames though.

Is there a way to get this working? Short of getting a 2nd public IP from my ISP?

Edit:
User error - I needed to forward ports on my router. The fs2netd lobby still isn't happy, but I can at least see & join the other games.

Edit2:
So, it seems that fs2netd stats are being saved correctly (kills/points at least) but nothing is being saved in the local pilot file (assuming that checking the barracks is a good test)

niffiwan

2014-05-24 02:10

developer   ~0015757

Finally getting back to this.

Local (non-fs2netd) multi:
Stats saved in pilot if accepted in debrief
Stats not saved in pilot if "tossed" in debrief

Now to replicate that behaviour in 3.7.0+...

niffiwan

2014-05-24 10:19

developer   ~0015758

Oops. Looks like I introduced this issue with my "fix" for 2906...

niffiwan

2014-05-25 08:58

developer   ~0015763

I have a patch for review: https://github.com/niffiwan/fs2open.github.com/commit/a1e0c6d9c534d0a7025074987bee1fd2d74ff7bb

In short, my fix for 2906 didn't consider that in multi there can be more than one Player in the game, which lead to any player.reset() also resetting the local players pilotfile stats. Oops.

I've retested 2906 and cloning/creating still work as expected with this change. Multi stats are now saved as expected, except that they are not being tossed correctly, but see 2923 for the solution to *that* problem.

niffiwan

2014-05-25 10:28

developer   ~0015765

Fix committed to trunk@10722.

Related Changesets

fs2open: trunk r10722

2014-05-25 05:43

niffiwan


Ported: N/A

Details Diff
Fix mantis 2940

Only reset pilotfile stats when the local Player is reset
Affected Issues
0002940
mod - /trunk/fs2_open/code/playerman/managepilot.cpp Diff File

Issue History

Date Modified Username Field Change
2013-10-21 09:03 niffiwan New Issue
2013-10-21 09:03 niffiwan Status new => assigned
2013-10-21 09:03 niffiwan Assigned To => niffiwan
2013-10-21 09:04 niffiwan Relationship added parent of 0002923
2013-10-21 16:38 FUBAR-BDHR Note Added: 0015339
2013-10-21 19:54 niffiwan Note Added: 0015340
2013-10-21 20:33 FUBAR-BDHR Note Added: 0015341
2013-10-22 02:41 niffiwan Note Added: 0015342
2013-10-22 03:31 FUBAR-BDHR Note Added: 0015343
2013-11-06 08:59 niffiwan Note Added: 0015386
2013-11-07 08:24 niffiwan Note Edited: 0015386
2013-11-07 08:29 niffiwan Note Edited: 0015386
2013-11-07 08:33 niffiwan Note Edited: 0015386
2013-11-07 08:33 niffiwan Note Edited: 0015386
2014-05-24 02:10 niffiwan Note Added: 0015757
2014-05-24 10:19 niffiwan Relationship added related to 0002906
2014-05-24 10:19 niffiwan Note Added: 0015758
2014-05-25 08:58 niffiwan Note Added: 0015763
2014-05-25 08:58 niffiwan Status assigned => code review
2014-05-25 10:28 niffiwan Changeset attached => fs2open trunk r10722
2014-05-25 10:28 niffiwan Note Added: 0015765
2014-05-25 10:28 niffiwan Status code review => resolved
2014-05-25 10:28 niffiwan Resolution open => fixed