Skip to content

Commit 148f4d0

Browse files
committed
Separate infjump and invincible
1 parent 00bb74c commit 148f4d0

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
@@ -1040,9 +1040,9 @@ void CCharacter::DDRacePostCoreTick()
10401040
m_Core.m_Jumped = 1;
10411041
}
10421042

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

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)