fix bugs?

This commit is contained in:
BotoX 2019-10-05 16:22:38 +02:00
parent 534fc75113
commit 617e2c4963
3 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ public MRESReturn OnAcceptInput(int entity, Handle hReturn, Handle hParams)
if(StrEqual(sCommand, "Activate", false)) if(StrEqual(sCommand, "Activate", false))
{ {
int attachedObject = GetEntPropEnt(entity, Prop_Data, "m_attachedObject"); int attachedObject = GetEntPropEnt(entity, Prop_Data, "m_attachedObject");
if(attachedObject) if(attachedObject != INVALID_ENT_REFERENCE)
{ {
int vphysObj = GetVPhysicsObject(attachedObject); int vphysObj = GetVPhysicsObject(attachedObject);
if(vphysObj) if(vphysObj)

View File

@ -518,7 +518,7 @@ void RecordDataIntoRecord(int iEntity, LagRecord Record)
void RestoreEntityFromRecord(int iEntity, int iFilter, LagRecord Record) void RestoreEntityFromRecord(int iEntity, int iFilter, LagRecord Record)
{ {
FilterTriggerMoved(iFilter); FilterTriggerMoved(iFilter);
BlockSolidMoved(iFilter); BlockSolidMoved(iEntity);
SDKCall(g_hSetAbsAngles, iEntity, Record.vecAngles); SDKCall(g_hSetAbsAngles, iEntity, Record.vecAngles);
SDKCall(g_hSetAbsOrigin, iEntity, Record.vecOrigin); SDKCall(g_hSetAbsOrigin, iEntity, Record.vecOrigin);

View File

@ -15,8 +15,8 @@ forward void OnRunThinkFunctionsPost(bool simulating);
native void FilterTriggerMoved(int entity); native void FilterTriggerMoved(int entity);
// -1 = Ignore, normal operation. // -1 = Ignore, normal operation.
// 0 = Block ALL SV_TriggerMoved. // 0 = Block ALL SV_SolidMoved.
// >0 = Entity index for which to allow SV_TriggerMoved to be called. // >0 = Entity index for which to allow SV_SolidMoved to be called.
// REMEMBER TO CALL THIS AGAIN WITH -1 AFTER USING IT !!! // REMEMBER TO CALL THIS AGAIN WITH -1 AFTER USING IT !!!
native void BlockSolidMoved(int entity); native void BlockSolidMoved(int entity);