Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/game/chars/CChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,11 @@ void CChar::SetVisualRange(byte newSight)
}
}

void CChar::ResetVisualRange()
{
m_iVisualRange = g_Cfg.m_iMapViewSize;
}

// Clean up weird flags.
// fix Weirdness.
// NOTE:
Expand Down
3 changes: 2 additions & 1 deletion src/game/chars/CChar.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,9 @@ public: void StatFlag_Mod(uint64 uiStatFlag, bool fMod) noexcept;
CRegion * GetRoom() const;
virtual int GetVisualRange() const override;
void SetVisualRange(byte newSight);
void ResetVisualRange();

virtual bool IsResourceMatch( const CResourceID& rid, dword dwArg ) const override;
virtual bool IsResourceMatch( const CResourceID& rid, dword dwArg ) const override;
bool IsResourceMatch( const CResourceID& rid, dword dwArg, dword dwArgResearch ) const;

bool IsSpeakAsGhost() const;
Expand Down
1 change: 1 addition & 0 deletions src/game/clients/CClientMsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,7 @@ void CClient::addPlayerStart( CChar * pChar )
*/

new PacketPlayerStart(this);
pChar->ResetVisualRange();
addMapDiff();
m_pChar->MoveToChar(pt, true, false, false, false); // make sure we are in active list
m_pChar->Update();
Expand Down