# HG changeset patch # User Adam Kaminski # Date 1611185494 18000 # Wed Jan 20 18:31:34 2021 -0500 # Node ID 35e794a815422879f38a21b07e72a2091fe34736 # Parent 8cb49775c42e343cf6ba4d498a32e6b66d183067 Fixed the sector's gravity property not being saved and reset properly when needed. diff -r 8cb49775c42e -r 35e794a81542 src/g_game.cpp --- a/src/g_game.cpp Sun Jan 17 13:42:29 2021 -0500 +++ b/src/g_game.cpp Wed Jan 20 18:31:34 2021 -0500 @@ -3652,6 +3652,14 @@ SERVERCOMMANDS_SetSectorFriction( ulIdx ); } + if ( sectors[ulIdx].SavedGravity != sectors[ulIdx].gravity ) + { + sectors[ulIdx].gravity = sectors[ulIdx].SavedGravity; + + if ( NETWORK_GetState( ) == NETSTATE_SERVER ) + SERVERCOMMANDS_SetSectorGravity( ulIdx ); + } + if ( sectors[ulIdx].SavedSpecial != sectors[ulIdx].special ) { sectors[ulIdx].special = sectors[ulIdx].SavedSpecial; diff -r 8cb49775c42e -r 35e794a81542 src/p_spec.cpp --- a/src/p_spec.cpp Sun Jan 17 13:42:29 2021 -0500 +++ b/src/p_spec.cpp Wed Jan 20 18:31:34 2021 -0500 @@ -1789,6 +1789,7 @@ sectors[i].SavedBaseCeilingYOffset = sectors[i].planes[sector_t::ceiling].xform.base_yoffs; sectors[i].SavedFriction = sectors[i].friction; sectors[i].SavedMoveFactor = sectors[i].movefactor; + sectors[i].SavedGravity = sectors[i].gravity; sectors[i].SavedSpecial = sectors[i].special; sectors[i].SavedDamage = sectors[i].damage; sectors[i].SavedMOD = sectors[i].mod;