mirror of
https://github.com/ENSL/NS.git
synced 2024-11-29 15:51:51 +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())
|
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;
|
theSuccess = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3375,6 +3375,10 @@ void AvHPlayer::Init()
|
||||||
this->mClientSpecialPASOrigin.x = this->mClientSpecialPASOrigin.y = this->mClientSpecialPASOrigin.z = 0.0f;
|
this->mClientSpecialPASOrigin.x = this->mClientSpecialPASOrigin.y = this->mClientSpecialPASOrigin.z = 0.0f;
|
||||||
this->mTimeOfLastPASUpdate = -1;
|
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->mTimeOfLastTeleport = -1;
|
||||||
this->mTimeOfLastHelpText = -1;
|
this->mTimeOfLastHelpText = -1;
|
||||||
this->mTimeOfLastUse = -1;
|
this->mTimeOfLastUse = -1;
|
||||||
|
@ -6003,8 +6007,7 @@ void AvHPlayer::InternalAlienUpgradesRegenerationThink()
|
||||||
|
|
||||||
void AvHPlayer::ProcessEntityBlip(CBaseEntity* inEntity)
|
void AvHPlayer::ProcessEntityBlip(CBaseEntity* inEntity)
|
||||||
{
|
{
|
||||||
const float kAlienFriendlyBlipRange = 1500;
|
const float kAlienEnemyBlipRange = 1500;
|
||||||
//const float kAlienEnemyBlipRange = 1500;
|
|
||||||
|
|
||||||
// Is player alien?
|
// Is player alien?
|
||||||
bool theIsAlien = this->GetIsAlien(true);
|
bool theIsAlien = this->GetIsAlien(true);
|
||||||
|
@ -8088,6 +8091,16 @@ void AvHPlayer::SetHasGivenOrder(bool inState)
|
||||||
this->mHasGivenOrder = inState;
|
this->mHasGivenOrder = inState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float AvHPlayer::GetTimeLastF4() const
|
||||||
|
{
|
||||||
|
return this->mTimeOfLastF4;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AvHPlayer::SetTimeLastF4(float inTime)
|
||||||
|
{
|
||||||
|
this->mTimeOfLastF4=inTime;
|
||||||
|
}
|
||||||
|
|
||||||
float AvHPlayer::GetTimeStartedTopDown() const
|
float AvHPlayer::GetTimeStartedTopDown() const
|
||||||
{
|
{
|
||||||
return this->mTimeStartedTopDown;
|
return this->mTimeStartedTopDown;
|
||||||
|
|
|
@ -298,6 +298,8 @@ public:
|
||||||
virtual void GiveNamedItem(const char *szName, bool inSendMessage = false);
|
virtual void GiveNamedItem(const char *szName, bool inSendMessage = false);
|
||||||
int GetNumberOfItems();
|
int GetNumberOfItems();
|
||||||
void GiveResources(float inResources);
|
void GiveResources(float inResources);
|
||||||
|
float GetTimeLastF4() const;
|
||||||
|
void SetTimeLastF4(float inTime);
|
||||||
float GetTimeStartedTopDown() const;
|
float GetTimeStartedTopDown() const;
|
||||||
float GetTimeOfLastConstructUse() const;
|
float GetTimeOfLastConstructUse() const;
|
||||||
void SetTimeOfLastConstructUse(float inTime);
|
void SetTimeOfLastConstructUse(float inTime);
|
||||||
|
@ -627,6 +629,7 @@ private:
|
||||||
bool mInTopDownMode;
|
bool mInTopDownMode;
|
||||||
int mTimeStartedTopDown;
|
int mTimeStartedTopDown;
|
||||||
|
|
||||||
|
float mTimeOfLastF4;
|
||||||
float mTimeOfLastSaying;
|
float mTimeOfLastSaying;
|
||||||
AvHMessageID mLastSaying;
|
AvHMessageID mLastSaying;
|
||||||
bool mIsSpeaking;
|
bool mIsSpeaking;
|
||||||
|
@ -687,6 +690,7 @@ private:
|
||||||
Vector mClientSpecialPASOrigin;
|
Vector mClientSpecialPASOrigin;
|
||||||
float mTimeOfLastPASUpdate;
|
float mTimeOfLastPASUpdate;
|
||||||
|
|
||||||
|
|
||||||
bool mClientIsAlien;
|
bool mClientIsAlien;
|
||||||
|
|
||||||
bool mAlienSightActive;
|
bool mAlienSightActive;
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
|
|
||||||
// Messages
|
// Messages
|
||||||
#define kReadyRoomMessage "ReadyRoomMessage"
|
#define kReadyRoomMessage "ReadyRoomMessage"
|
||||||
|
#define kReadyRoomThrottleMessage "ReadyRoomThrottleMessage"
|
||||||
#define kReinforcementMessage "ReinforcementMessage"
|
#define kReinforcementMessage "ReinforcementMessage"
|
||||||
#define kReinforcingMessage "ReinforcingMessage"
|
#define kReinforcingMessage "ReinforcingMessage"
|
||||||
#define kObserverMessage "ObserverMessage"
|
#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.
|
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
|
ReinforcementMessage
|
||||||
{
|
{
|
||||||
You are waiting in line to spawn back in.
|
You are waiting in line to spawn back in.
|
||||||
|
|
Loading…
Reference in a new issue