From 1079ef1fa48ca785df2658b464cad178d19b151d Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 26 Jul 2012 20:39:28 +0000 Subject: [PATCH] Fix: food items from enemies or in a map spawn as fresh git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5424 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Item Types.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tactical/Item Types.cpp b/Tactical/Item Types.cpp index 9dd8b0d9..698b65c6 100644 --- a/Tactical/Item Types.cpp +++ b/Tactical/Item Types.cpp @@ -1330,6 +1330,12 @@ OBJECTTYPE& OBJECTTYPE::operator=(const OLD_OBJECTTYPE_101& src) (*this)[0]->data.fUsed = src.fUsed; // flags for whether the item is used or not (*this)[0]->data.bTemperature = 0.0; + // Flugente: the temperature variable determines the quality of the food, begin with being fresh + if ( Item[this->usItem].foodtype > 0 ) + { + (*this)[0]->data.bTemperature = OVERHEATING_MAX_TEMPERATURE; + } + if(src.usItem == OWNERSHIP)//dnl ch29 120909 { (*this)[0]->data.owner.ubOwnerProfile = src.ugYucky.ubOwnerProfile; @@ -1360,6 +1366,12 @@ OBJECTTYPE& OBJECTTYPE::operator=(const OLD_OBJECTTYPE_101& src) (*this)[x]->data.ubImprintID = src.ubImprintID; // ID of merc that item is imprinted on (*this)[x]->data.fUsed = src.fUsed; // flags for whether the item is used or not (*this)[x]->data.bTemperature = 0.0; + + // Flugente: the temperature variable determines the quality of the food, begin with being fresh + if ( Item[this->usItem].foodtype > 0 ) + { + (*this)[x]->data.bTemperature = OVERHEATING_MAX_TEMPERATURE; + } } }