Clean gamestate part

This commit is contained in:
mittorn 2017-01-09 21:57:46 +00:00
parent 857c080545
commit 70af6c8e9e
3 changed files with 11 additions and 11 deletions

View File

@ -604,8 +604,7 @@ void CCSBot::Update()
&& GetProfile()->GetTeamwork() > minAutoFollowTeamwork
&& CanAutoFollow()
&& !IsBusy()
&& !IsFollowing()
&& !GetGameState()->IsAtPlantedBombsite())
&& !IsFollowing())
{
// chance of following is proportional to teamwork attribute
if (GetProfile()->GetTeamwork() > RANDOM_FLOAT(0.0f, 1.0f))

View File

@ -5,9 +5,10 @@ CSGameState::CSGameState(CCSBot *owner)
m_owner = owner;
m_isRoundOver = false;
// m_bombState = MOVING;
#if 0
m_lastSawBomber.Invalidate();
m_lastSawLooseBomb.Invalidate();
#endif
m_validateInterval.Invalidate();
// m_isPlantedBombPosKnown = false;
// m_plantedBombsite = UNKNOWN;
@ -36,12 +37,11 @@ void CSGameState::Reset()
CCSBotManager *ctrl = TheCSBots();
m_isRoundOver = false;
#if 0
// bomb
m_bombState = MOVING;
m_lastSawBomber.Invalidate();
m_lastSawLooseBomb.Invalidate();
#if 0
m_bombsiteCount = ctrl->GetZoneCount();
m_isPlantedBombPosKnown = false;
@ -110,7 +110,7 @@ bool CSGameState::IsRoundOver() const
{
return m_isRoundOver;
}
#if 0
void CSGameState::SetBombState(BombState state)
{
// if state changed, reset "last seen" timestamps
@ -309,6 +309,7 @@ bool CSGameState::IsBombsiteClear(int zoneIndex) const
#endif
return false;
}
#endif
#if 0
void CSGameState::InitializeHostageInfo()
{
@ -692,4 +693,4 @@ void CSGameState::AllHostagesGone()
for (int i = 0; i < m_hostageCount; ++i)
m_hostage[i].isValid = false;
}
#endif
#endif

View File

@ -44,7 +44,7 @@ public:
void Reset();
void OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other); // Event handling
bool IsRoundOver() const; // true if round has been won or lost (but not yet reset)
#if 0
// bomb defuse scenario
enum BombState
{
@ -81,14 +81,14 @@ public:
void ClearBombsite(int zoneIndex); // mark bombsite as clear
const Vector *GetBombPosition() const; // return where we think the bomb is, or NULL if we don't know
#endif
// hostage rescue scenario
//enum ValidateStatusType:unsigned char //C++11 feature
private:
CCSBot *m_owner; // who owns this gamestate
bool m_isRoundOver; // true if round is over, but no yet reset
#if 0
// bomb defuse scenario
void SetBombState(BombState state);
BombState GetBombState() { return m_bombState; }
@ -100,7 +100,7 @@ private:
IntervalTimer m_lastSawLooseBomb;
Vector m_looseBombPos;
#endif
CountdownTimer m_validateInterval;
};