MantisBT - Zandronum
View Issue Details
0000443Zandronum[All Projects] Bugpublic2011-05-14 17:022018-09-30 20:03
CommanderZ 
Torr Samaho 
normalminoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
98d 
1.0 
0000443: PlayerTeam() returning incorrect value in single player
Calling PlayerTeam() in single player normally results in integral value 4. However, if I save the game and then load it, the value returned is suddenly 0. After entering next map, it is once again 4 (but it changes back to 0 after another save/load cycle).

This can be easily bypassed by checking game mode, but it is annoying to have the conditions longer than necessary.
Call PlayerTeam() before and after loading a game for the first time.
No tags attached.
? RGH-debug-skulltag.pk3 (253) 2011-05-14 17:31
/tracker/file_download.php?file_id=311&type=bug
Issue History
2011-05-14 17:02CommanderZNew Issue
2011-05-14 17:08Torr SamahoNote Added: 0001613
2011-05-14 17:12Torr SamahoStatusnew => feedback
2011-05-14 17:31CommanderZFile Added: RGH-debug-skulltag.pk3
2011-05-14 17:32CommanderZNote Added: 0001616
2011-05-14 17:32CommanderZStatusfeedback => new
2011-05-14 19:48Torr SamahoNote Added: 0001620
2011-05-14 20:28Torr SamahoNote Added: 0001622
2011-05-14 20:31Torr SamahoAssigned To => Torr Samaho
2011-05-14 20:31Torr SamahoStatusnew => feedback
2011-05-15 18:33Torr SamahoStatusfeedback => resolved
2011-05-15 18:33Torr SamahoFixed in Version => 1.0
2011-05-15 18:33Torr SamahoResolutionopen => fixed
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2018-09-30 20:03Blzut3Statusresolved => closed

Notes
(0001613)
Torr Samaho   
2011-05-14 17:08   
please post a minimal example wad
(0001616)
CommanderZ   
2011-05-14 17:32   
Done.

Source code for the ACS is simple:

IgnoreHash(#library "RGH_ACS")
IgnoreHash(#include "zcommon.acs")

script 500 ENTER
{
    while(true){
        log(i:PlayerTeam());
    
        delay(36);
    }
}
(0001620)
Torr Samaho   
2011-05-14 19:48   
Should be fixed now. I'll probably post a testing binary later.
(0001622)
Torr Samaho   
2011-05-14 20:28   
This contains the fix.