Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002166Zandronum[All Projects] Bugpublic2015-04-04 16:462018-09-30 21:39
ReporterCh0wW 
Assigned ToTorr Samaho 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAnyOSAnyOS VersionAny
Product Version2.0 
Target Version2.1Fixed in Version2.1 
Summary0002166: Last CTF capture isn't shown on scoreboard
DescriptionIn CTF, whenever someone captures the last flag before a scorelimit, it is NEVER added to the player's point list's scoreboard.

The problem lies by adding +1 to the teamscore BEFORE adding the point to the player.

Main Function problem seen in AFlag::HandlePickup

        if (( TEAM_GetSimpleCTFSTMode( )) && ( NETWORK_GetState( ) != NETSTATE_CLIENT ) && ( CLIENTDEMO_IsPlaying( ) == false ))
        {
            // Give his team a point.
            TEAM_SetScore( Owner->player->ulTeam, TEAM_GetScore( Owner->player->ulTeam ) + 1, true );
            Owner->player->lPointCount++;
Steps To Reproduce1) Scorelimit 1;
2) Capture the flag;
3) Scoreboard: Points - 0
Additional InformationI never thought this problem was overlooked for so long.

Same point-giving error on these functions:

• FUNC( LS_Team_Score ) ► p_Inspec.cpp
• FUNC( LS_Team_GivePoints ) ► p_Inspec.cpp

• TEAM_ScoreSkulltagPoint ► team.cpp
• PLAYER_GivePossessionPoint ► p_interaction.cpp
• AWhiteFlag::HandlePickup ► g_shared/a_flags.cpp

Fix "template":

// Give his team a point.
Owner->player->lPointCount++;
TEAM_SetScore( Owner->player->ulTeam, TEAM_GetScore( Owner->player->ulTeam ) + 1, true );
            
Attached Files

- Relationships

-  Notes
User avatar (0012021)
Edward-san (developer)
2015-04-04 17:18
edited on: 2015-04-04 17:29

Does the issue happen also in a Team Possession game?


Sorry, not just Possession.

User avatar (0012022)
Ch0wW (reporter)
2015-04-04 17:27

I listed on additionnal Notes all the functions that have the same problem.

Anyway, no, this problem does not happen on Possession, that gives player points BEFORE adding points to the teamscore.
User avatar (0012023)
Dusk (developer)
2015-04-04 17:41

I don't understand what the report says at all. The proposed "fix" is useless because of its bizarre nature. If you fixed this, please post an unified diff.
User avatar (0012024)
Torr Samaho (administrator)
2015-04-04 17:54
edited on: 2015-04-04 17:54

The report looks reasonable to me. He just suggests to change the order in which

TEAM_SetScore( Owner->player->ulTeam, TEAM_GetScore( Owner->player->ulTeam ) + 1, true );

and

Owner->player->lPointCount++;

are called. This makes sense since TEAM_SetScore calls SERVERCONSOLE_UpdateScoreboard.

User avatar (0012026)
Torr Samaho (administrator)
2015-04-04 18:23

I looked into this further and noticed that what I thought earlier is not the case. The point count of a player is never updated on the Windows server console since

SERVERCONSOLE_UpdatePlayerInfo ( ulPlayer, UDF_FRAGS );

is never called. I'll take care of this.
User avatar (0012044)
Torr Samaho (administrator)
2015-04-05 08:41

I fixed the problem that the point count in the scoreboard of the Windows server console was never updated. I couldn't reproduce the timing problems you reported though. Does it still happen with the latest changes I made? If so, please report exactly how to reproduce the issue and, in particular, where the outdated value is still displayed. The in game scoreboard seemed to work fine for me in 2.0.
User avatar (0012048)
Ch0wW (reporter)
2015-04-05 13:20

looks like it now works fine.
User avatar (0012053)
Dusk (developer)
2015-04-05 19:29

Was fixed by:'https://bitbucket.org/Torr_Samaho/zandronum/commits/a33c8415 [^]'

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: Ch0wW
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2015-04-04 16:46 Ch0wW New Issue
2015-04-04 17:18 Edward-san Note Added: 0012021
2015-04-04 17:18 Edward-san Status new => feedback
2015-04-04 17:27 Ch0wW Note Added: 0012022
2015-04-04 17:27 Ch0wW Status feedback => new
2015-04-04 17:29 Edward-san Note Edited: 0012021 View Revisions
2015-04-04 17:29 Edward-san Status new => feedback
2015-04-04 17:41 Dusk Note Added: 0012023
2015-04-04 17:54 Torr Samaho Note Added: 0012024
2015-04-04 17:54 Torr Samaho Note Edited: 0012024 View Revisions
2015-04-04 17:55 Torr Samaho Assigned To => Torr Samaho
2015-04-04 17:55 Torr Samaho Status feedback => assigned
2015-04-04 18:23 Torr Samaho Note Added: 0012026
2015-04-05 08:41 Torr Samaho Note Added: 0012044
2015-04-05 13:20 Ch0wW Note Added: 0012048
2015-04-05 19:29 Dusk Note Added: 0012053
2015-04-05 19:29 Dusk Status assigned => resolved
2015-04-05 19:29 Dusk Fixed in Version => 2.1
2015-04-05 19:29 Dusk Resolution open => fixed
2015-04-05 19:29 Dusk Target Version => 2.1
2018-09-30 21:39 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker