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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user