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
0000516Zandronum[All Projects] Bugpublic2011-07-13 23:412011-07-14 00:14
ReporterPositron 
Assigned ToTorr Samaho 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version98d 
Target VersionFixed in Version 
Summary0000516: thingCountName( "DoomPlayer", 0 )
DescriptionWhen you want to count the number of alive players in the game, you might use the following statement: thingCountName( "DoomPlayer", 0 ). It works fine for the most part but breaks in some cases.

In coop, it breaks when someone spectates. For example: if you have two players in-game and one of them spectates, the function will continue to report that two players are in game. You can then rejoin the game and the count will get incremented to 3. Repeat to increase the count farther.

In Survival, the count includes eliminated players. It works fine when the player is in the death sequence but as soon as the player joins the spectating team, it starts to include the eliminated player.

I haven't tested this function in other game modes.
Attached Files

- Relationships

-  Notes
User avatar (0001903)
Torr Samaho (administrator)
2011-07-14 00:14
edited on: 2011-07-14 00:18

Technically a spectator body is of type DoomPlayer (at least if the former player was of type DoomPlayer), so this is not a bug. You are trying to abuse a function for something that it's not intended to do. ThingCountName also counts voodoo dolls which is a clear indication that it's not doing what you want it to.

Use the ACS function PlayerCount instead. This should do what you need and is actually intended to do so.


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: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2011-07-13 23:41 Positron New Issue
2011-07-14 00:14 Torr Samaho Note Added: 0001903
2011-07-14 00:14 Torr Samaho Status new => closed
2011-07-14 00:14 Torr Samaho Assigned To => Torr Samaho
2011-07-14 00:14 Torr Samaho Resolution open => no change required
2011-07-14 00:15 Torr Samaho Note Edited: 0001903 View Revisions
2011-07-14 00:18 Torr Samaho Note Edited: 0001903 View Revisions
2012-06-09 13:22 Torr Samaho Category General => Bug






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker