Skip to content

Commit

Permalink
New ini RevealFlag setting REVEALF_ONHORSE
Browse files Browse the repository at this point in the history
Added REVEALF_ONHORSE setting to RevealFlag to allow or disallow stealth walking if you are on a mount.
  • Loading branch information
canerksk committed Dec 4, 2024
1 parent 29e9ddc commit d79b4f5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3962,4 +3962,8 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
2. No damage amount can be less than 1.

4-12-2024, canerksk
- Fixed: Sphere crash troubleshooting if a player has no CHATNAME value and remove a channel
- Fixed: Sphere crash troubleshooting if a player has no CHATNAME value and remove a channel

4-12-2024, canerksk
- Added: New ini RevealFlag setting REVEALF_ONHORSE
Added REVEALF_ONHORSE setting to RevealFlag to allow or disallow stealth walking if you are on a mount.
3 changes: 2 additions & 1 deletion src/game/CServerConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ enum REVEALFLAGS_TYPE
REVEALF_SNOOPING = 0x0040, // Do not reveal while a character snooping.
REVEALF_STEALING = 0x0080, // Do not reveal while a character stealing.
REVEALF_STEALING_SUCCESS = 0x0100, // Reveal if stealing successfully finished.
REVEALF_STEALING_FAIL = 0x0200 // Reveal if stealing failed.
REVEALF_STEALING_FAIL = 0x0200, // Reveal if stealing failed.
REVEALF_ONHORSE = 0x0400 // Reveal if on horse
};

enum EMOTEFLAGS_TYPE
Expand Down
3 changes: 3 additions & 0 deletions src/game/chars/CCharAct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4819,6 +4819,9 @@ void CChar::CheckRevealOnMove()
if ( IsTrigUsed(TRIGGER_STEPSTEALTH) )
OnTrigger(CTRIG_StepStealth, this);

if (g_Cfg.m_iRevealFlags & REVEALF_ONHORSE && IsStatFlag(STATF_ONHORSE))
Reveal();

m_StepStealth -= IsStatFlag(STATF_FLY|STATF_HOVERING) ? 2 : 1;
if ( m_StepStealth <= 0 )
Reveal();
Expand Down
1 change: 1 addition & 0 deletions src/sphere.ini
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ RacialFlags=0
// REVEALF_STEALING 0080 // Do not reveal hidden players while stealing.
// REVEALF_STEALING_SUCCESS 0100 // Reveal hidden players when stealing successfully finished.
// REVEALF_STEALING_FAIL 0200 // Reveal hidden players when stealing failed.
// REVEALF_ONHORSE 0400 // Reveal if on horse
// Set to 04 to make it behave like 55i.
RevealFlags=01|02|04|08|010|040|080|0200
Expand Down

0 comments on commit d79b4f5

Please sign in to comment.