Add some additional checks to unit production functions.
Patch by Buginator. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4175 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
04cf4c0260
commit
279230ca8c
|
@ -6926,6 +6926,7 @@ UDWORD getProductionQuantity(STRUCTURE *psStructure, DROID_TEMPLATE *psTemplate)
|
||||||
UDWORD inc, factoryType, factoryInc;
|
UDWORD inc, factoryType, factoryInc;
|
||||||
FACTORY *psFactory;
|
FACTORY *psFactory;
|
||||||
|
|
||||||
|
if (psStructure == NULL) return 0;
|
||||||
if (psStructure->player == productionPlayer)
|
if (psStructure->player == productionPlayer)
|
||||||
{
|
{
|
||||||
psFactory = &psStructure->pFunctionality->factory;
|
psFactory = &psStructure->pFunctionality->factory;
|
||||||
|
@ -6954,6 +6955,7 @@ UDWORD getProductionBuilt(STRUCTURE *psStructure, DROID_TEMPLATE *psTemplate)
|
||||||
UDWORD inc, factoryType, factoryInc;
|
UDWORD inc, factoryType, factoryInc;
|
||||||
FACTORY *psFactory;
|
FACTORY *psFactory;
|
||||||
|
|
||||||
|
if (psStructure == NULL) return 0;
|
||||||
if (psStructure->player == productionPlayer)
|
if (psStructure->player == productionPlayer)
|
||||||
{
|
{
|
||||||
psFactory = &psStructure->pFunctionality->factory;
|
psFactory = &psStructure->pFunctionality->factory;
|
||||||
|
|
Loading…
Reference in New Issue