mirror of
https://github.com/ENSL/NS.git
synced 2024-11-25 22:11:04 +00:00
Mantis: 984
o Added ReadyRoomThrottleMessage to titles.txt o Player has to press f4 twice within two seconds to go to the readyroom git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@113 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
d297f41e6c
commit
c5080559e6
5 changed files with 40 additions and 6 deletions
|
@ -337,9 +337,20 @@ BOOL AvHGamerules::ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
|
|||
{
|
||||
if(!theAvHPlayer->GetIsBeingDigested())
|
||||
{
|
||||
theAvHPlayer->SetPlayMode(PLAYMODE_READYROOM, true);
|
||||
// puzl: 984
|
||||
// Add a throttle on the readyroom key
|
||||
const static int kReadyRoomThrottleTimeout=2.0f;
|
||||
if ( (theAvHPlayer->GetTimeLastF4() == -1.0f) ||
|
||||
(gpGlobals->time > theAvHPlayer->GetTimeLastF4() + kReadyRoomThrottleTimeout) )
|
||||
{
|
||||
theAvHPlayer->SendMessage(kReadyRoomThrottleMessage);
|
||||
theAvHPlayer->SetTimeLastF4(gpGlobals->time);
|
||||
}
|
||||
else if ( gpGlobals->time < theAvHPlayer->GetTimeLastF4() + kReadyRoomThrottleTimeout )
|
||||
{
|
||||
theAvHPlayer->SetPlayMode(PLAYMODE_READYROOM, true);
|
||||
}
|
||||
}
|
||||
|
||||
theSuccess = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3375,6 +3375,10 @@ void AvHPlayer::Init()
|
|||
this->mClientSpecialPASOrigin.x = this->mClientSpecialPASOrigin.y = this->mClientSpecialPASOrigin.z = 0.0f;
|
||||
this->mTimeOfLastPASUpdate = -1;
|
||||
|
||||
// puzl: 984
|
||||
// record the last time the player attempted to go to the readyroom
|
||||
this->mTimeOfLastF4 = -1.0f;
|
||||
|
||||
this->mTimeOfLastTeleport = -1;
|
||||
this->mTimeOfLastHelpText = -1;
|
||||
this->mTimeOfLastUse = -1;
|
||||
|
@ -6003,8 +6007,7 @@ void AvHPlayer::InternalAlienUpgradesRegenerationThink()
|
|||
|
||||
void AvHPlayer::ProcessEntityBlip(CBaseEntity* inEntity)
|
||||
{
|
||||
const float kAlienFriendlyBlipRange = 1500;
|
||||
//const float kAlienEnemyBlipRange = 1500;
|
||||
const float kAlienEnemyBlipRange = 1500;
|
||||
|
||||
// Is player alien?
|
||||
bool theIsAlien = this->GetIsAlien(true);
|
||||
|
@ -8088,6 +8091,16 @@ void AvHPlayer::SetHasGivenOrder(bool inState)
|
|||
this->mHasGivenOrder = inState;
|
||||
}
|
||||
|
||||
float AvHPlayer::GetTimeLastF4() const
|
||||
{
|
||||
return this->mTimeOfLastF4;
|
||||
}
|
||||
|
||||
void AvHPlayer::SetTimeLastF4(float inTime)
|
||||
{
|
||||
this->mTimeOfLastF4=inTime;
|
||||
}
|
||||
|
||||
float AvHPlayer::GetTimeStartedTopDown() const
|
||||
{
|
||||
return this->mTimeStartedTopDown;
|
||||
|
|
|
@ -298,6 +298,8 @@ public:
|
|||
virtual void GiveNamedItem(const char *szName, bool inSendMessage = false);
|
||||
int GetNumberOfItems();
|
||||
void GiveResources(float inResources);
|
||||
float GetTimeLastF4() const;
|
||||
void SetTimeLastF4(float inTime);
|
||||
float GetTimeStartedTopDown() const;
|
||||
float GetTimeOfLastConstructUse() const;
|
||||
void SetTimeOfLastConstructUse(float inTime);
|
||||
|
@ -626,7 +628,8 @@ private:
|
|||
bool mClientInTopDownMode;
|
||||
bool mInTopDownMode;
|
||||
int mTimeStartedTopDown;
|
||||
|
||||
|
||||
float mTimeOfLastF4;
|
||||
float mTimeOfLastSaying;
|
||||
AvHMessageID mLastSaying;
|
||||
bool mIsSpeaking;
|
||||
|
@ -687,6 +690,7 @@ private:
|
|||
Vector mClientSpecialPASOrigin;
|
||||
float mTimeOfLastPASUpdate;
|
||||
|
||||
|
||||
bool mClientIsAlien;
|
||||
|
||||
bool mAlienSightActive;
|
||||
|
@ -778,7 +782,7 @@ private:
|
|||
bool mNeedsTeamUpdate;
|
||||
bool mSendTeamUpdate;
|
||||
bool mSendSpawnScreenFade;
|
||||
|
||||
|
||||
int mDigestee;
|
||||
float mTimeOfLastDigestDamage;
|
||||
float mTimeOfLastCombatThink;
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
|
||||
// Messages
|
||||
#define kReadyRoomMessage "ReadyRoomMessage"
|
||||
#define kReadyRoomThrottleMessage "ReadyRoomThrottleMessage"
|
||||
#define kReinforcementMessage "ReinforcementMessage"
|
||||
#define kReinforcingMessage "ReinforcingMessage"
|
||||
#define kObserverMessage "ObserverMessage"
|
||||
|
|
|
@ -409,6 +409,11 @@ ReadyRoomMessage
|
|||
You are in the Ready Room. Walk through an entrance to join a team or observe the game.
|
||||
}
|
||||
|
||||
ReadyRoomThrottleMessage
|
||||
{
|
||||
You must press the key twice to return to the Ready Room
|
||||
}
|
||||
|
||||
ReinforcementMessage
|
||||
{
|
||||
You are waiting in line to spawn back in.
|
||||
|
|
Loading…
Reference in a new issue