Class enum instead of hardcoded ints.

Removed superfluous .Valid() checks.

Check for spectator spawnrequest in case they somehow has a class, so we don't get "x players were supposed to be spawned but failed" if it happens.
This commit is contained in:
William Moberg
2016-03-09 11:35:32 +01:00
parent b782e73556
commit 534d6639e5
4 changed files with 29 additions and 19 deletions
+9 -1
View File
@@ -15,11 +15,19 @@ public:
virtual void Update(double dt) override;
private:
// This enum must correspond to the command values for PickTeam buttons.
enum class PlayerClass
{
None = 0,
Assault,
Defender,
Sniper
};
struct SpawnRequest
{
int PlayerID;
ComponentInfo::EnumType Team;
ComponentInfo::EnumType Class;
PlayerClass Class;
};
bool m_NetworkEnabled = false;