diff --git a/direct/src/distributed/cDistributedSmoothNodeBase.cxx b/direct/src/distributed/cDistributedSmoothNodeBase.cxx index 266b45a087..7e4f375417 100644 --- a/direct/src/distributed/cDistributedSmoothNodeBase.cxx +++ b/direct/src/distributed/cDistributedSmoothNodeBase.cxx @@ -276,9 +276,23 @@ finish_send_update(DCPacker &packer) { packer.pop(); bool pack_ok = packer.end_pack(); - nassertv(pack_ok); + if (pack_ok) { + Datagram dg(packer.get_data(), packer.get_length()); + _repository->send_datagram(dg); - Datagram dg(packer.get_data(), packer.get_length()); - _repository->send_datagram(dg); + } else { +#ifndef NDEBUG + if (packer.had_range_error()) { + ostringstream error; + error << "Node position out of range for DC file: " + << _node_path << " pos = " << _node_path.get_pos() + << " hpr = " << _node_path.get_hpr(); + nassert_raise(error.str()); + + } else { + nassert_raise("Unexpected pack error in DC file."); + } +#endif + } }