можно ли переписать этот код для работы с адресами памяти? без доступа к структурам игры. bool CClientGame::VehicleCollisionHandler(CVehicleSAInterface*& pCollidingVehicle, CEntitySAInterface* pCollidedWith, int iModelIndex, float fDamageImpulseMag,
                                          float fCollidingDamageImpulseMag, uint16 usPieceType, CVector vecCollisionPos, CVector vecCollisionVelocity)
{
    if (pCollidingVehicle && pCollidedWith)
    {
        CPools*                    pPools = g_pGame->GetPools();
        SClientEntity<CVehicleSA>* pColliderEntity = pPools->GetVehicle((DWORD*)pCollidingVehicle);
        if (pColliderEntity)
        {
            CClientEntity* pVehicleClientEntity = pColliderEntity->pClientEntity;
            if (!pVehicleClientEntity)
            {
                return false;
            }

            CClientVehicle* pClientVehicle = static_cast<CClientVehicle*>(pVehicleClientEntity);
            CClientEntity*  pCollidedWithClientEntity = pPools->GetClientEntity((DWORD*)pCollidedWith);

            CLuaArguments Arguments;
            if (pCollidedWithClientEntity)
            {
                Arguments.PushElement(pCollidedWithClientEntity);
            }
            else
            {
                Arguments.PushNil();
            }
            Arguments.PushNumber(fDamageImpulseMag);
            Arguments.PushNumber(usPieceType);
            Arguments.PushNumber(vecCollisionPos.fX);
            Arguments.PushNumber(vecCollisionPos.fY);
            Arguments.PushNumber(vecCollisionPos.fZ);
            Arguments.PushNumber(vecCollisionVelocity.fX);
            Arguments.PushNumber(vecCollisionVelocity.fY);
            Arguments.PushNumber(vecCollisionVelocity.fZ);
            Arguments.PushNumber(fCollidingDamageImpulseMag);
            Arguments.PushNumber(iModelIndex);

            pVehicleClientEntity->CallEvent("onClientVehicleCollision", Arguments, true);

            // Update the colliding vehicle, because it might have been invalidated in onClientVehicleCollision (e.g. fixVehicle)
            pCollidingVehicle = reinterpret_cast<CVehicleSAInterface*>(pVehicleClientEntity->GetGameEntity()->GetInterface());

            // Allocate a BitStream
            NetBitStreamInterface* pBitStream = g_pNet->AllocateNetBitStream();
            // Make sure it created
            if (pBitStream)
            {
                if (pBitStream->Version() >= 0x028)
                {
                    // Sync Stuff
                    // if it's not a local vehicle + it collided with the local player
                    if (pVehicleClientEntity->IsLocalEntity() == false && pCollidedWithClientEntity == g_pClientGame->GetLocalPlayer())
                    {
                        // is it below the anti spam threshold?
                        if (pClientVehicle->GetTimeSinceLastPush() >= MIN_PUSH_ANTISPAM_RATE)
                        {
                            // if there is no controlling player
                            if (!pClientVehicle->GetControllingPlayer())
                            {
                                CDeathmatchVehicle* Vehicle = static_cast<CDeathmatchVehicle*>(pVehicleClientEntity);
                                // if We aren't already syncing the vehicle
                                if (GetUnoccupiedVehicleSync()->Exists(Vehicle) == false)
                                {
                                    // Write the vehicle ID
                                    pBitStream->Write(pVehicleClientEntity->GetID());
                                    // Send!
                                    g_pNet->SendPacket(PACKET_ID_VEHICLE_PUSH_SYNC, pBitStream, PACKET_PRIORITY_MEDIUM,
                                                       PACKET_RELIABILITY_UNRELIABLE_SEQUENCED);
                                    // Reset our push time
                                    pClientVehicle->ResetLastPushTime();
                                }
                            }
                        }
                    }
                }
                g_pNet->DeallocateNetBitStream(pBitStream);
            }
            return true;
        }
    }
    return false;
}