Skip to content

Commit d486caa

Browse files
author
d1str4ught
committed
feature macros removed
1 parent 2b6e7a1 commit d486caa

5 files changed

Lines changed: 0 additions & 19 deletions

File tree

‎src/common/service.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,3 @@
77
#define __PET_SYSTEM__
88
#define __UDP_BLOCK__
99
#endif
10-
11-
/*
12-
This fixes the POS_FIGHTING state, when a character will enter POS_FIGHTING state,
13-
after 10s of no damage dealt, should've been switched to POS_STANDING state.
14-
Files affected: char.cpp, char.h, char_battle.cpp, char_skill.cpp
15-
*/
16-
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT

‎src/game/char.cpp‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,7 @@ void CHARACTER::Initialize()
361361
m_bIsLoadedAffect = false;
362362
cannot_dead = false;
363363

364-
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
365364
m_dwLastCombatTime = 0;
366-
#endif
367365

368366
#ifdef __PET_SYSTEM__
369367
m_petSystem = 0;
@@ -4064,7 +4062,6 @@ void CHARACTER::UpdateStateMachine(DWORD dwPulse)
40644062
if (IsDead())
40654063
return;
40664064

4067-
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
40684065
if (IsPC() && IsPosition(POS_FIGHTING))
40694066
{
40704067
const DWORD now = get_dword_time();
@@ -4076,7 +4073,6 @@ void CHARACTER::UpdateStateMachine(DWORD dwPulse)
40764073
if (now - m_dwLastCombatTime >= 10000)
40774074
SetVictim(NULL); // triggers battle_end() -> POS_STANDING
40784075
}
4079-
#endif
40804076

40814077
Update();
40824078
m_dwNextStatePulse = dwPulse + m_dwStateDuration;

‎src/game/char.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,15 +2038,13 @@ class CHARACTER : public CEntity, public CFSM, public CHorseRider
20382038
int m_iLastPMPulse;
20392039
int m_iPMCounter;
20402040

2041-
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
20422041
public:
20432042
void EnterCombat();
20442043
void UpdateLastCombatTime() { m_dwLastCombatTime = get_dword_time(); }
20452044
DWORD GetLastCombatTime() const { return m_dwLastCombatTime; }
20462045

20472046
private:
20482047
DWORD m_dwLastCombatTime;
2049-
#endif
20502048
};
20512049

20522050
ESex GET_SEX(LPCHARACTER ch);

‎src/game/char_battle.cpp‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,6 @@ void CHARACTER::SendDamagePacket(LPCHARACTER pAttacker, int Damage, BYTE DamageF
15921592
}
15931593
}
15941594

1595-
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
15961595
void CHARACTER::EnterCombat()
15971596
{
15981597
if (!IsPC())
@@ -1608,7 +1607,6 @@ void CHARACTER::EnterCombat()
16081607
if (m_dwLastCombatTime == 0)
16091608
m_dwLastCombatTime = get_dword_time();
16101609
}
1611-
#endif
16121610

16131611
//
16141612
// CHARACTER::Damage 메소드는 this가 데미지를 입게 한다.
@@ -2305,7 +2303,6 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu
23052303
//
23062304
if (!cannot_dead)
23072305
{
2308-
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
23092306
// REAL combat activity only: final damage > 0
23102307
if (dam > 0)
23112308
{
@@ -2320,7 +2317,6 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu
23202317
pAttacker->EnterCombat();
23212318
}
23222319
}
2323-
#endif
23242320
PointChange(POINT_HP, -dam, false);
23252321
}
23262322

‎src/game/char_skill.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,12 +2462,10 @@ bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaste
24622462
if (!pkSk)
24632463
return false;
24642464

2465-
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
24662465
if (IsPC() && IS_SET(pkSk->dwFlag, SKILL_FLAG_ATTACK))
24672466
{
24682467
EnterCombat();
24692468
}
2470-
#endif
24712469

24722470
if (bCanUseHorseSkill && pkSk->dwType != SKILL_TYPE_HORSE)
24732471
return BATTLE_NONE;

0 commit comments

Comments
 (0)