~armagetronad-ct/armagetronad/0.4-delaycmd

« back to all changes in this revision

Viewing changes to src/engine/ePlayer.cpp

  • Committer: Yann Kaiser
  • Date: 2012-10-14 21:49:50 UTC
  • Revision ID: kaiser.yann@gmail.com-20121014214950-iox9dyta0iortfc6
Initialise readiness and only accept new readiness from the client when their player are on a team

Show diffs side-by-side

added added

removed removed

Lines of Context:
4667
4667
    return se_GetSpam( *this ).shuffleSpam;
4668
4668
}
4669
4669
 
4670
 
ePlayerNetID::ePlayerNetID(int p):nNetObject(),listID(-1), teamListID(-1), timeCreated_( tSysTimeFloat() ), allowTeamChange_(false), registeredMachine_(0), pID(p)
 
4670
ePlayerNetID::ePlayerNetID(int p):nNetObject(),listID(-1), teamListID(-1), timeCreated_( tSysTimeFloat() ), allowTeamChange_(false), registeredMachine_(0), pID(p), ready(false)
4671
4671
{
4672
4672
    // default access level
4673
4673
    lastAccessLevel = tAccessLevel_Default;
6272
6272
        // read chat and spectator status
6273
6273
        unsigned short flags = sync.flags();
6274
6274
 
6275
 
        if( sync.has_ready() && (sn_GetNetState() != nSERVER || se_matches < 0 ))
 
6275
        if( sync.has_ready() && (
 
6276
                sn_GetNetState() != nSERVER
 
6277
                || se_matches < 0 && CurrentTeam()))
6276
6278
        {
6277
6279
            ready = sync.ready();
6278
6280
        }