diff --git a/LagCompensation/gamedata/LagCompensation.games.txt b/LagCompensation/gamedata/LagCompensation.games.txt index 13b61126..c616d185 100644 --- a/LagCompensation/gamedata/LagCompensation.games.txt +++ b/LagCompensation/gamedata/LagCompensation.games.txt @@ -39,12 +39,6 @@ "library" "server" "linux" "@_ZN18CCollisionProperty24MarkPartitionHandleDirtyEv" } - - "RecomputePVSInformation" - { - "library" "server" - "linux" "@_ZN22CServerNetworkProperty23RecomputePVSInformationEv" - } } "Functions" diff --git a/LagCompensation/scripting/LagCompensation.sp b/LagCompensation/scripting/LagCompensation.sp index 663baa14..0b1b87f8 100644 --- a/LagCompensation/scripting/LagCompensation.sp +++ b/LagCompensation/scripting/LagCompensation.sp @@ -16,7 +16,7 @@ public Plugin myinfo = name = "LagCompensation", author = "BotoX", description = "", - version = "1.1", + version = "1.0", url = "" }; @@ -31,8 +31,6 @@ bool g_bHasPhysHooks = true; #define EFL_DIRTY_SURROUNDING_COLLISION_BOUNDS (1<<14) #define EFL_CHECK_UNTOUCH (1<<24) #define COORDINATE_FRAME_SIZE 14 -#define PVSINFO_OFFSET 16 -#define PVSINFO_SIZE 32/4 enum { @@ -87,7 +85,6 @@ enum struct LagRecord float angAbsRotation[3]; float flSimulationTime; float rgflCoordinateFrame[COORDINATE_FRAME_SIZE]; - int PVSInfo[PVSINFO_SIZE]; } enum struct EntityLagData @@ -112,7 +109,6 @@ bool g_bCleaningUp = true; Handle g_hCalcAbsolutePosition; Handle g_hMarkPartitionHandleDirty; -Handle g_hRecomputePVSInformation; Handle g_hUTIL_Remove; Handle g_hRestartRound; @@ -126,7 +122,6 @@ int g_iParent; int g_iSpawnFlags; int g_iTouchStamp; int g_iCollision; -int g_iNetwork; int g_iSolidFlags; int g_iSolidType; int g_iSurroundType; @@ -168,15 +163,6 @@ public void OnPluginStart() } g_hMarkPartitionHandleDirty = EndPrepSDKCall(); - // CServerNetworkProperty::RecomputePVSInformation - StartPrepSDKCall(SDKCall_Raw); - if(!PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, "RecomputePVSInformation")) - { - delete hGameData; - SetFailState("PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, \"RecomputePVSInformation\") failed!"); - } - g_hRecomputePVSInformation = EndPrepSDKCall(); - // ::UTIL_Remove g_hUTIL_Remove = DHookCreateFromConf(hGameData, "UTIL_Remove"); @@ -335,7 +321,6 @@ public void OnMapStart() g_iSpawnFlags = FindDataMapInfo(0, "m_spawnflags"); g_iTouchStamp = FindDataMapInfo(0, "touchStamp"); g_iCollision = FindDataMapInfo(0, "m_Collision"); - g_iNetwork = FindDataMapInfo(0, "m_Network"); g_iSolidFlags = FindDataMapInfo(0, "m_usSolidFlags"); g_iSolidType = FindDataMapInfo(0, "m_nSolidType"); g_iSurroundType = FindDataMapInfo(0, "m_nSurroundType"); @@ -901,17 +886,6 @@ void RecordDataIntoRecord(int iEntity, LagRecord Record) GetEntDataVector(iEntity, g_iAngAbsRotation, Record.angAbsRotation); GetEntDataArray(iEntity, g_iCoordinateFrame, view_as(Record.rgflCoordinateFrame), COORDINATE_FRAME_SIZE); Record.flSimulationTime = GetEntDataFloat(iEntity, g_iSimulationTime); - - // Make sure to have fresh PVS info before caching it. - // NetworkProp()->RecomputePVSInformation(); - Address NetworkProp = GetEntityAddress(iEntity) + view_as
(g_iNetwork); - SDKCall(g_hRecomputePVSInformation, NetworkProp); - - if(GetEdictFlags(iEntity) & FL_EDICT_DIRTY_PVS_INFORMATION) - PrintToBoth("POST FL_EDICT_DIRTY_PVS_INFORMATION !!!!!!!!"); - - // CServerNetworkProperty::GetPVSInfo(): return this + 16; - GetEntDataArray(iEntity, g_iNetwork + PVSINFO_OFFSET, view_as(Record.PVSInfo), PVSINFO_SIZE); } bool DoesRotationInvalidateSurroundingBox(int iEntity) @@ -952,19 +926,12 @@ bool DoesRotationInvalidateSurroundingBox(int iEntity) } } -void InvalidatePhysicsRecursive(int iEntity, LagRecord Record) +void InvalidatePhysicsRecursive(int iEntity) { -/* // NetworkProp()->MarkPVSInformationDirty() int fStateFlags = GetEdictFlags(iEntity); fStateFlags |= FL_EDICT_DIRTY_PVS_INFORMATION; SetEdictFlags(iEntity, fStateFlags); -*/ - - if(GetEdictFlags(iEntity) & FL_EDICT_DIRTY_PVS_INFORMATION) - PrintToBoth("RESTORE FL_EDICT_DIRTY_PVS_INFORMATION !!!!!!!!"); - - SetEntDataArray(iEntity, g_iNetwork + PVSINFO_OFFSET, view_as(Record.PVSInfo), PVSINFO_SIZE); // CollisionProp()->MarkPartitionHandleDirty(); Address CollisionProp = GetEntityAddress(iEntity) + view_as
(g_iCollision); @@ -988,7 +955,7 @@ void RestoreEntityFromRecord(int iEntity, LagRecord Record) SetEntDataArray(iEntity, g_iCoordinateFrame, view_as(Record.rgflCoordinateFrame), COORDINATE_FRAME_SIZE); SetEntDataFloat(iEntity, g_iSimulationTime, Record.flSimulationTime); - InvalidatePhysicsRecursive(iEntity, Record); + InvalidatePhysicsRecursive(iEntity); } @@ -1143,11 +1110,6 @@ void LagRecord_Copy(LagRecord obj, const LagRecord other) { obj.rgflCoordinateFrame[i] = other.rgflCoordinateFrame[i]; } - - for(int i = 0; i < PVSINFO_SIZE; i++) - { - obj.PVSInfo[i] = other.PVSInfo[i]; - } } bool CompareVectors(const float vec1[3], const float vec2[3])