show collision polygons that were loaded from pre-4.7 bam files

This commit is contained in:
David Rose 2003-11-13 19:21:25 +00:00
parent 9ca8280f34
commit 1c638ea9ba
2 changed files with 16 additions and 4 deletions

View File

@ -277,11 +277,21 @@ write_datagram(BamWriter *, Datagram &me) {
// place
////////////////////////////////////////////////////////////////////
void CollisionSolid::
fillin(DatagramIterator &scan, BamReader*) {
_flags = scan.get_uint8();
if ((_flags & F_effective_normal) != 0) {
_effective_normal.read_datagram(scan);
fillin(DatagramIterator &scan, BamReader *manager) {
if (manager->get_file_minor_ver() < 7) {
bool tangible = scan.get_bool();
if (!tangible) {
_flags &= ~F_tangible;
}
} else {
_flags = scan.get_uint8();
if ((_flags & F_effective_normal) != 0) {
_effective_normal.read_datagram(scan);
}
}
// The viz is always stale after reading from a bam file.
_flags |= F_viz_geom_stale;
}

View File

@ -103,6 +103,8 @@ protected:
private:
LVector3f _effective_normal;
// Be careful reordering these bits, since they are written to a bam
// file.
enum Flags {
F_tangible = 0x01,
F_effective_normal = 0x02,