Mantis 0001057:

o Fixed bug where the buildminimap command would not work

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@181 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-06-12 12:32:15 +00:00
parent de72ad1346
commit 70c0bab675
2 changed files with 14 additions and 2 deletions

View file

@ -62,7 +62,7 @@ bool AvHMiniMap::GetIsProcessing(float* outPercentageDone) const
{ {
bool theIsProcessing = false; bool theIsProcessing = false;
if(this->mIsProcessing) if(this->mIsProcessing || (this->mNumSamplesProcessed == this->mNumSamplesToProcess && this->mNumSamplesProcessed > 0))
{ {
if(outPercentageDone) if(outPercentageDone)
{ {
@ -327,7 +327,7 @@ bool AvHMiniMap::WriteMapToSprite()
{ {
bool theSuccess = false; bool theSuccess = false;
if(!this->GetIsProcessing()) if(this->GetIsProcessing())
{ {
// Open file // Open file
// puzl: 1064 // puzl: 1064
@ -435,6 +435,14 @@ bool AvHMiniMap::WriteSpritesIfJustFinished()
{ {
bool theSuccess = false; bool theSuccess = false;
// test
char test[255];
sprintf(test, "this->GetIsProcessing() = %d, this->mNumSamplesProcessed = %d, this->mNumSamplesToProcess = %d\n", this->GetIsProcessing(), this->mNumSamplesProcessed, this->mNumSamplesToProcess);
gEngfuncs.pfnConsolePrint(test);
// :test
if(this->GetIsProcessing() && (this->mNumSamplesProcessed == this->mNumSamplesToProcess)) if(this->GetIsProcessing() && (this->mNumSamplesProcessed == this->mNumSamplesToProcess))
{ {
this->mIsProcessing = false; this->mIsProcessing = false;

View file

@ -1182,6 +1182,7 @@ union float_converter
height = READ_LONG(); height = READ_LONG();
*map = new uint8[num_samples]; *map = new uint8[num_samples];
finished = false; finished = false;
break;
case 1: case 1:
{ {
int packet_samples = READ_BYTE(); int packet_samples = READ_BYTE();
@ -1189,9 +1190,12 @@ union float_converter
{ {
(*map)[processed_samples++] = READ_BYTE(); (*map)[processed_samples++] = READ_BYTE();
} }
finished = false;
break;
} }
case 2: case 2:
finished = true; finished = true;
break;
} }
END_READ(); END_READ();
} }