Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Change data type of currentBuildPts from SWORD to int32_t, by Kreuvf.

Based on patch by Kreuvf.

Avoids currentBuildPts overflow effect: very long progress bar.

Fixes ticket:3685.
  • Loading branch information...
commit 5b3163b9433604a470a9b4b3758081e2cdbb3755 1 parent 9a97b48
Cyp authored August 25, 2012
2  src/structure.cpp
@@ -5457,7 +5457,7 @@ void buildingComplete(STRUCTURE *psBuilding)
5457 5457
 		prevState = intGetResearchState();
5458 5458
 	}
5459 5459
 
5460  
-	psBuilding->currentBuildPts = (SWORD)psBuilding->pStructureType->buildPoints;
  5460
+	psBuilding->currentBuildPts = psBuilding->pStructureType->buildPoints;
5461 5461
 	psBuilding->status = SS_BUILT;
5462 5462
 
5463 5463
 	visTilesUpdate(psBuilding);
2  src/structuredef.h
@@ -252,7 +252,7 @@ struct STRUCTURE : public BASE_OBJECT
252 252
 
253 253
 	STRUCTURE_STATS     *pStructureType;            /* pointer to the structure stats for this type of building */
254 254
 	STRUCT_STATES       status;                     /* defines whether the structure is being built, doing nothing or performing a function */
255  
-	SWORD               currentBuildPts;            /* the build points currently assigned to this structure */
  255
+	int32_t             currentBuildPts;            /* the build points currently assigned to this structure */
256 256
 	SWORD               resistance;                 /* current resistance points, 0 = cannot be attacked electrically */
257 257
 	UDWORD              lastResistance;             /* time the resistance was last increased*/
258 258
 	FUNCTIONALITY       *pFunctionality;            /* pointer to structure that contains fields necessary for functionality */

0 notes on commit 5b3163b

Please sign in to comment.
Something went wrong with that request. Please try again.