View Single Post
Old 10-02-2005, 12:22 PM   #9 (permalink)
ArteGordon
Forum Master
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Dave1969
It was already there before i added your stuff. Its the FS taming system in there
then the problem is that you need to change the version number from 14 (the version that had your taming stuff) to 15, and you need to add the new code below

Code:
if(m_AI != null && m_AI.m_DeactivationTimer != null && m_AI.m_DeactivationTimer.Running){
			     // write out the time left on the deactivation timer
			     writer.Write( (TimeSpan) (m_AI.m_DeactivationTimer.m_End - DateTime.Now));
			} else {
			     // not active so on deserialization deactivate immediately
			     writer.Write( (TimeSpan) TimeSpan.Zero );
			}
after the taming serializations that were already added, not before.

And you will also have to move this

Code:
	// ARTEGORDONMOD
			// PlayerRangeSensitiveMod
			if ( version >= 14 )
			{
				TimeSpan restartDeactivationdelay = reader.ReadTimeSpan();
				if(m_AI != null) {
				    m_AI.m_RestartDeactivationdelay = restartDeactivationdelay;
				}
			}
to the end of the Deserialization, after the taming stuff that you added, and change the version test to 15 instead of 14.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline