Skip to content

Commit

Permalink
Game: renamed two vars to match style
Browse files Browse the repository at this point in the history
  • Loading branch information
lynxlynxlynx committed Aug 24, 2024
1 parent ca4e547 commit fea24bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 6 additions & 6 deletions gemrb/core/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2052,17 +2052,17 @@ void Game::CastOnRest() const
//timestop effect
void Game::TimeStop(Actor* owner, ieDword end)
{
timestop_owner=owner;
timestop_end=end;
timestopper = owner;
timestopEnd = end;
}

// check if the passed actor is a victim of timestop
bool Game::TimeStoppedFor(const Actor* target) const
{
if (!timestop_owner) {
if (!timestopper) {
return false;
}
if (target == timestop_owner || target->GetStat(IE_DISABLETIMESTOP)) {
if (target == timestopper || target->GetStat(IE_DISABLETIMESTOP)) {
return false;
}
return true;
Expand Down Expand Up @@ -2343,13 +2343,13 @@ ieByte *Game::AllocateMazeData()

int Game::RemainingTimestop() const
{
int remaining = timestop_end - GameTime;
int remaining = timestopEnd - GameTime;
return remaining > 0 ? remaining : 0;
}

bool Game::IsTimestopActive() const
{
return timestop_end > GameTime;
return timestopEnd > GameTime;
}

bool Game::RandomEncounter(ResRef& BaseArea) const
Expand Down
9 changes: 5 additions & 4 deletions gemrb/core/Game.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ class GEM_EXPORT Game : public Scriptable {
private:
/** reads the challenge rating table */
void LoadCRTable();
Actor *timestop_owner = nullptr;
ieDword timestop_end = 0;
Actor* timestopper = nullptr;
ieDword timestopEnd = 0;

public:
/** Returns the PC's slot count for partyID */
int FindPlayer(unsigned int partyID) const;
Expand Down Expand Up @@ -494,8 +495,8 @@ class GEM_EXPORT Game : public Scriptable {
/** Checks if any timestop effects are active */
bool IsTimestopActive() const;
int RemainingTimestop() const;
Actor *GetTimestopOwner() const { return timestop_owner; };
void SetTimestopOwner(Actor *owner) { timestop_owner = owner; };
Actor* GetTimestopOwner() const { return timestopper; };
void SetTimestopOwner(Actor* owner) { timestopper = owner; };
/** Checks the bounty encounters (used in bg1) */
bool RandomEncounter(ResRef& baseArea) const;
/** Resets the area and bored comment timers of the whole party */
Expand Down

0 comments on commit fea24bd

Please sign in to comment.