mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Space Viking's many mercs changes plus numerous generic bug fixes
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2498 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+13
-4
@@ -1267,7 +1267,7 @@ UINT8 CurrentPlayerProgressPercentage(void)
|
||||
{
|
||||
UINT32 uiCurrentIncome;
|
||||
UINT32 uiPossibleIncome;
|
||||
UINT8 ubCurrentProgress;
|
||||
UINT8 ubCurrentProgress = gGameExternalOptions.ubGameProgressIncrement;
|
||||
UINT8 ubKillsPerPoint;
|
||||
UINT16 usKillsProgress;
|
||||
UINT16 usControlProgress;
|
||||
@@ -1343,12 +1343,21 @@ UINT8 CurrentPlayerProgressPercentage(void)
|
||||
|
||||
// WDS: Adding more ways to progress in the game
|
||||
// Get a ratio of sectors visited to the total number of sectors
|
||||
usVisitProgress = CountSurfaceSectorsVisited() * gGameExternalOptions.ubGameProgressPortionVisited / ((MAP_WORLD_X - 2) * (MAP_WORLD_Y - 2));
|
||||
usVisitProgress = CountSurfaceSectorsVisited() * gGameExternalOptions.ubGameProgressPortionVisited / ((MAP_WORLD_X - 2) * (MAP_WORLD_Y - 2) - 56 /* note: should be calculated */);
|
||||
|
||||
// add control progress
|
||||
// add visit progress
|
||||
ubCurrentProgress += usVisitProgress;
|
||||
|
||||
return(ubCurrentProgress);
|
||||
// Add increment to progress
|
||||
ubCurrentProgress += gGameExternalOptions.ubGameProgressIncrement;
|
||||
|
||||
if (ubCurrentProgress < gGameExternalOptions.ubGameProgressMinimum)
|
||||
return gGameExternalOptions.ubGameProgressMinimum;
|
||||
|
||||
if (ubCurrentProgress < 100)
|
||||
return ubCurrentProgress;
|
||||
else
|
||||
return 100;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user