View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000566 | Spring engine | General | public | 2007-07-22 15:03 | 2007-08-09 19:48 | ||||
Reporter | KDR_11k | ||||||||
Assigned To | imbaczek | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000566: [PATCH]Builders don't properly check for the resources they use | ||||||||
Description | CUnit::AddBuildPower only checks if enough current metal and energy is present before giving the go ahead to add the build power but the functions used to deduct the resources (CTeam::UseEnergy, CTeam::UseMetal) use a different formula to check if they can deduct, namely: amount < resource - 10*previousResourceUpkeep (replace "Resource" with the proper resource) So if resource - 10*previousResourceUpkeep < amount < resource the construction will add the build power but the game will not deduct the resources as CTeam::UseEnergy/UseMetal assume there's not enough around. This patch makes CUnit::AddBuildPower check if CTeam::UseEnergy and UseMetal returned true and not add to the build progress if not. It will also refund the metal that UseMetal deducted if it returned true but UseEnergy didn't. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2007-07-22 15:03 | KDR_11k | New Issue | |
2007-07-22 15:03 | KDR_11k | File Added: noMoreFreeLunch.patch | |
2007-08-09 19:48 | imbaczek | Status | new => resolved |
2007-08-09 19:48 | imbaczek | Resolution | open => fixed |
2007-08-09 19:48 | imbaczek | Assigned To | => imbaczek |
2007-08-09 19:48 | imbaczek | Note Added: 0001060 |