Fix missing duplicated code change

ryzomclassic-develop
kaetemi 4 years ago
parent 6dfff83589
commit 144088af13

@ -587,6 +587,8 @@ void CCDBSynchronised::pushDelta( CBitMemStream& s, CCDBStructNodeLeaf *node, ui
uint64 isNull = 1; uint64 isNull = 1;
s.serialAndLog2( isNull, 1 ); s.serialAndLog2( isNull, 1 );
bitsize += 1; bitsize += 1;
if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value NULL for index %d prop %s", index, node->buildTextId().toString().c_str() );
} }
else else
{ {
@ -639,26 +641,44 @@ void CCDBSynchronised::pushDeltaPermanent( NLMISC::CBitMemStream& s, CCDBStructN
uint64 value; uint64 value;
value = (uint64)_DataContainer.getValue64( index ); // "delta from 0" value = (uint64)_DataContainer.getValue64( index ); // "delta from 0"
if ( node->type() == ICDBStructNode::TEXT ) if ( node->nullable() && value == 0 )
{
s.serialAndLog2( value, 32 );
bitsize += 32;
if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value %" NL_I64 "d (TEXT-32) for index %d prop %s", (sint64)value, index, node->buildTextId().toString().c_str() );
}
else if ( node->type() == ICDBStructNode::PACKED )
{ {
uint bits; uint64 isNull = 1;
pushPackedValue( s, value, bitsize, bits ); s.serialAndLog2( isNull, 1 );
bitsize += 1;
if ( VerboseDatabase ) if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value %" NL_I64 "d (PACKED %u bits) for index %d prop %s", (sint64)value, bits, index, node->buildTextId().toString().c_str() ); nldebug( "CDB: Pushing permanent value NULL for index %d prop %s", index, node->buildTextId().toString().c_str() );
} }
else else
{ {
s.serialAndLog2( value, (uint)node->type() ); if ( node->nullable() )
bitsize += (uint32)node->type(); {
if ( VerboseDatabase ) uint64 isNull = 0;
nldebug( "CDB: Pushing permanent value %" NL_I64 "d (%u bits) for index %d prop %s", (sint64)value, (uint32)node->type(), index, node->buildTextId().toString().c_str() ); s.serialAndLog2( isNull, 1 );
bitsize += 1;
}
if ( node->type() == ICDBStructNode::TEXT )
{
s.serialAndLog2( value, 32 );
bitsize += 32;
if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value %" NL_I64 "d (TEXT-32) for index %d prop %s", (sint64)value, index, node->buildTextId().toString().c_str() );
}
else if ( node->type() == ICDBStructNode::PACKED )
{
uint bits;
pushPackedValue( s, value, bitsize, bits );
if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value %" NL_I64 "d (PACKED %u bits) for index %d prop %s", (sint64)value, bits, index, node->buildTextId().toString().c_str() );
}
else
{
s.serialAndLog2( value, (uint)node->type() );
bitsize += (uint32)node->type();
if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value %" NL_I64 "d (%u bits) for index %d prop %s", (sint64)value, (uint32)node->type(), index, node->buildTextId().toString().c_str() );
}
} }
} }
else else

Loading…
Cancel
Save