koraktor / steam-condenser

A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers
https://koraktor.de/steam-condenser
Other
358 stars 67 forks source link

[php] numberOfPlayers and playerNumber #92

Closed vaniok closed 13 years ago

vaniok commented 13 years ago

Source server returns: $this->playerNumber = $this->contentData->getByte();

and GoldSrc returns: $this->numberOfPlayers = $this->contentData->getByte();

In php this can be worked around by doing so: $playerNumber = isset($info['numberOfPlayers'])?$info['numberOfPlayers']:$info['playerNumber'];

But the question is - why same information containing variables are named differently for different server types?

koraktor commented 13 years ago

Good question. They should have the same name of course.

But this should be a minor problem as the array isn't actively accessed from inside Steam Condenser's own code. Additionally, S2A_INFO_DETAILED packets are only used by very outdated GoldSrc servers (before 10/24/2008).