Skip to content

Commit fb8ea35

Browse files
authored
Merge pull request ddnet#9593 from KebsCS/pr-separate-infjump-invincible
Separate infjump and invincible
2 parents 9f306fc + 148f4d0 commit fb8ea35

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/game/client/prediction/entities/character.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,9 +1039,9 @@ void CCharacter::DDRacePostCoreTick()
10391039
m_Core.m_Jumped = 1;
10401040
}
10411041

1042-
if((m_Core.m_Super || m_Core.m_Invincible || m_Core.m_EndlessJump) && m_Core.m_Jumped > 1)
1042+
if((m_Core.m_Super || m_Core.m_EndlessJump) && m_Core.m_Jumped > 1)
10431043
{
1044-
// Super players, invincible players and players with infinite jumps always have light feet
1044+
// Super players and players with infinite jumps always have light feet
10451045
m_Core.m_Jumped = 1;
10461046
}
10471047

src/game/server/entities/character.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ void CCharacter::SetInvincible(bool Invincible)
199199
m_Core.m_Invincible = Invincible;
200200
if(Invincible)
201201
UnFreeze();
202+
203+
SetEndlessJump(Invincible);
202204
}
203205

204206
void CCharacter::SetLiveFrozen(bool Active)
@@ -2188,9 +2190,9 @@ void CCharacter::DDRacePostCoreTick()
21882190
m_Core.m_Jumped = 1;
21892191
}
21902192

2191-
if((m_Core.m_Super || m_Core.m_Invincible || m_Core.m_EndlessJump) && m_Core.m_Jumped > 1)
2193+
if((m_Core.m_Super || m_Core.m_EndlessJump) && m_Core.m_Jumped > 1)
21922194
{
2193-
// Super players, invincible players and players with infinite jumps always have light feet
2195+
// Super players and players with infinite jumps always have light feet
21942196
m_Core.m_Jumped = 1;
21952197
}
21962198

src/game/server/save.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ bool CSaveHotReloadTee::Load(CCharacter *pChr, int Team, bool IsSwap)
494494
{
495495
bool Result = m_SaveTee.Load(pChr, Team, IsSwap);
496496
pChr->SetSuper(m_Super);
497-
pChr->SetInvincible(m_Invincible);
497+
pChr->m_Core.m_Invincible = m_Invincible;
498498
pChr->GetPlayer()->m_LastTeleTee = m_SavedTeleTee;
499499

500500
return Result;

0 commit comments

Comments
 (0)