mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-10 15:21:43 +00:00
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:
parent
a8372fca14
commit
01ead2bf70
1 changed files with 36 additions and 23 deletions
|
@ -2700,11 +2700,24 @@ void AvHGamerules::ResetEntities()
|
||||||
AvHPlayer* thePlayer = dynamic_cast<AvHPlayer*>(theBaseEntity);
|
AvHPlayer* thePlayer = dynamic_cast<AvHPlayer*>(theBaseEntity);
|
||||||
if(thePlayer && (thePlayer->GetPlayMode() == PLAYMODE_READYROOM)) // && (thePlayer->GetHasSeenATeam()))
|
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
|
else
|
||||||
{
|
{
|
||||||
theBaseEntity->ResetEntity();
|
theBaseEntity->ResetEntity();
|
||||||
|
}
|
||||||
|
|
||||||
// Don't mark commander stations as useable in this case
|
// Don't mark commander stations as useable in this case
|
||||||
AvHCommandStation* theCommandStation = dynamic_cast<AvHCommandStation*>(theBaseEntity);
|
AvHCommandStation* theCommandStation = dynamic_cast<AvHCommandStation*>(theBaseEntity);
|
||||||
|
@ -2731,7 +2744,6 @@ void AvHGamerules::ResetEntities()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
END_FOR_ALL_BASEENTITIES();
|
END_FOR_ALL_BASEENTITIES();
|
||||||
|
|
||||||
this->mHasPlayersToReset = true;
|
this->mHasPlayersToReset = true;
|
||||||
|
@ -3227,12 +3239,13 @@ void AvHGamerules::Think(void)
|
||||||
this->mFirstUpdate = false;
|
this->mFirstUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float playerResetDelay = 0.3f;
|
// ResetPlayer throttling, commented out for now
|
||||||
if(this->mHasPlayersToReset && (this->mLastPlayerResetTime + playerResetDelay < theTime) )
|
// const float playerResetDelay = 0.3f;
|
||||||
{
|
// if(this->mHasPlayersToReset && (this->mLastPlayerResetTime + playerResetDelay < theTime) )
|
||||||
this->ResetPlayers();
|
// {
|
||||||
this->mLastPlayerResetTime = theTime;
|
// this->ResetPlayers();
|
||||||
}
|
// this->mLastPlayerResetTime = theTime;
|
||||||
|
// }
|
||||||
|
|
||||||
// Handle queued network messages
|
// Handle queued network messages
|
||||||
#ifdef USE_NETWORK_METERING
|
#ifdef USE_NETWORK_METERING
|
||||||
|
|
Loading…
Reference in a new issue