mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #3800
3800: Get rid of current tuning in predicted world r=Jupeyy a=TsFreddie Missed a spot where the predicted world still returns current tuning. closes #3799 ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Freddie Wang <tsfreddiewang@gmail.com>
This commit is contained in:
commit
cd19e22959
|
@ -2241,8 +2241,8 @@ void CGameClient::UpdatePrediction()
|
|||
// if ddnetcharacter is available, ignore server-wide tunings for hook and collision
|
||||
if(m_Snap.m_aCharacters[m_Snap.m_LocalClientID].m_HasExtendedData)
|
||||
{
|
||||
m_GameWorld.m_Tuning[g_Config.m_ClDummy].m_PlayerCollision = 1;
|
||||
m_GameWorld.m_Tuning[g_Config.m_ClDummy].m_PlayerHooking = 1;
|
||||
m_GameWorld.m_Core.m_Tuning[g_Config.m_ClDummy].m_PlayerCollision = 1;
|
||||
m_GameWorld.m_Core.m_Tuning[g_Config.m_ClDummy].m_PlayerHooking = 1;
|
||||
}
|
||||
|
||||
// restore characters from previously saved ones if they temporarily left the snapshot
|
||||
|
|
|
@ -289,7 +289,7 @@ void CGameWorld::ReleaseHooked(int ClientID)
|
|||
|
||||
CTuningParams *CGameWorld::Tuning()
|
||||
{
|
||||
return &m_Tuning[g_Config.m_ClDummy];
|
||||
return &m_Core.m_Tuning[g_Config.m_ClDummy];
|
||||
}
|
||||
|
||||
CEntity *CGameWorld::GetEntity(int ID, int EntType)
|
||||
|
@ -531,7 +531,6 @@ void CGameWorld::CopyWorld(CGameWorld *pFrom)
|
|||
for(int i = 0; i < 2; i++)
|
||||
{
|
||||
m_Core.m_Tuning[i] = pFrom->m_Core.m_Tuning[i];
|
||||
m_Tuning[i] = pFrom->m_Tuning[i];
|
||||
}
|
||||
m_pTuningList = pFrom->m_pTuningList;
|
||||
m_Teams = pFrom->m_Teams;
|
||||
|
|
|
@ -90,10 +90,9 @@ public:
|
|||
CEntity *FindMatch(int ObjID, int ObjType, const void *pObjData);
|
||||
void Clear();
|
||||
|
||||
CTuningParams m_Tuning[2];
|
||||
CTuningParams *m_pTuningList;
|
||||
CTuningParams *TuningList() { return m_pTuningList; }
|
||||
CTuningParams *GetTuning(int i) { return i == 0 ? Tuning() : &TuningList()[i]; }
|
||||
CTuningParams *GetTuning(int i) { return &TuningList()[i]; }
|
||||
|
||||
private:
|
||||
void RemoveEntities();
|
||||
|
|
Loading…
Reference in a new issue