o Reverted the throttling of players on entity reset

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@454 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2006-05-06 20:24:14 +00:00
parent a8372fca14
commit 01ead2bf70
1 changed files with 36 additions and 23 deletions

View File

@ -2700,11 +2700,24 @@ void AvHGamerules::ResetEntities()
AvHPlayer* thePlayer = dynamic_cast<AvHPlayer*>(theBaseEntity);
if(thePlayer && (thePlayer->GetPlayMode() == PLAYMODE_READYROOM)) // && (thePlayer->GetHasSeenATeam()))
{
// SNIP
int theUser3 = thePlayer->pev->iuser3;
int theUser4 = thePlayer->pev->iuser4;
int thePlayMode = thePlayer->pev->playerclass;
int thePlayerTeam = thePlayer->pev->team;
int theSolidType = thePlayer->pev->solid;
thePlayer->ResetEntity();
thePlayer->pev->iuser3 = theUser3;
thePlayer->pev->iuser4 = theUser4;
thePlayer->pev->playerclass = thePlayMode;
thePlayer->pev->team = thePlayerTeam;
thePlayer->pev->solid = theSolidType;
}
else
{
theBaseEntity->ResetEntity();
}
// Don't mark commander stations as useable in this case
AvHCommandStation* theCommandStation = dynamic_cast<AvHCommandStation*>(theBaseEntity);
@ -2731,7 +2744,6 @@ void AvHGamerules::ResetEntities()
}
}
}
}
END_FOR_ALL_BASEENTITIES();
this->mHasPlayersToReset = true;
@ -3227,12 +3239,13 @@ void AvHGamerules::Think(void)
this->mFirstUpdate = false;
}
const float playerResetDelay = 0.3f;
if(this->mHasPlayersToReset && (this->mLastPlayerResetTime + playerResetDelay < theTime) )
{
this->ResetPlayers();
this->mLastPlayerResetTime = theTime;
}
// ResetPlayer throttling, commented out for now
// const float playerResetDelay = 0.3f;
// if(this->mHasPlayersToReset && (this->mLastPlayerResetTime + playerResetDelay < theTime) )
// {
// this->ResetPlayers();
// this->mLastPlayerResetTime = theTime;
// }
// Handle queued network messages
#ifdef USE_NETWORK_METERING