From 97fbcbd507a3be483772022a0425e98a75c2fb6f Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 14 Sep 2006 18:03:51 +0000 Subject: [PATCH] fix LODNode startup --- panda/src/pgraph/lodNode.I | 7 ++++++- panda/src/putil/updateSeq.I | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/panda/src/pgraph/lodNode.I b/panda/src/pgraph/lodNode.I index 6bbcd6f554..02d2948070 100644 --- a/panda/src/pgraph/lodNode.I +++ b/panda/src/pgraph/lodNode.I @@ -292,6 +292,7 @@ CData(const LODNode::CData ©) : _switch_vector(copy._switch_vector), _lowest(copy._lowest), _highest(copy._highest), + _bounds_seq(UpdateSeq::old()), _got_force_switch(copy._got_force_switch), _force_switch(copy._force_switch), _num_shown(copy._num_shown) @@ -304,7 +305,11 @@ CData(const LODNode::CData ©) : // Description: //////////////////////////////////////////////////////////////////// INLINE LODNode::Switch:: -Switch(float in, float out) : _shown(false) { +Switch(float in, float out) : + _shown(false), + _bounds_seq(UpdateSeq::old()), + _verify_ok(false) +{ set_range(in, out); } diff --git a/panda/src/putil/updateSeq.I b/panda/src/putil/updateSeq.I index 1ea594af44..0ec0b5b63b 100644 --- a/panda/src/putil/updateSeq.I +++ b/panda/src/putil/updateSeq.I @@ -208,7 +208,7 @@ operator ++ () { if (priv_is_special(new_seq)) { // Oops, wraparound. We don't want to confuse the new value // with our special cases. - new_seq = (PN_int32)SC_old; + new_seq = (PN_int32)SC_old + 1; } #ifdef HAVE_THREADS @@ -220,7 +220,7 @@ operator ++ () { if (priv_is_special(new_seq)) { // Oops, wraparound. We don't want to confuse the new value // with our special cases. - new_seq = (PN_int32)SC_old; + new_seq = (PN_int32)SC_old + 1; } result = AtomicAdjust::compare_and_exchange(_seq, old_seq, new_seq); } @@ -243,7 +243,7 @@ operator ++ (int) { if (priv_is_special(new_seq)) { // Oops, wraparound. We don't want to confuse the new value // with our special cases. - new_seq = (PN_int32)SC_old; + new_seq = (PN_int32)SC_old + 1; } #ifdef HAVE_THREADS @@ -255,7 +255,7 @@ operator ++ (int) { if (priv_is_special(new_seq)) { // Oops, wraparound. We don't want to confuse the new value // with our special cases. - new_seq = (PN_int32)SC_old; + new_seq = (PN_int32)SC_old + 1; } result = AtomicAdjust::compare_and_exchange(_seq, old_seq, new_seq); }