mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
updated minor map version, necessary due to object changes
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+7
-2
@@ -2494,13 +2494,18 @@ BOOLEAN StackedObjectData::Load( INT8** hBuffer, float dMajorMapVersion, UINT8 u
|
|||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
if (dMajorMapVersion >= 7 && ubMinorMapVersion >= 30)
|
if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_VERSION)
|
||||||
{
|
{
|
||||||
// Flugente: changed this, otherwise game would crash when reading WF maps if class ObjectData was different. this is a rough fix and by no means perfect
|
// Flugente: changed this, otherwise game would crash when reading WF maps if class ObjectData was different. this is a rough fix and by no means perfect
|
||||||
LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) );
|
LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) );
|
||||||
}
|
}
|
||||||
|
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_REPAIR_SYSTEM)
|
||||||
|
{
|
||||||
|
// sObjectFlag' size changed
|
||||||
|
LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) - sizeof(this->data.sObjectFlag) );
|
||||||
|
}
|
||||||
// When saving maps with the new map editor that has weapon overheated feature included!
|
// When saving maps with the new map editor that has weapon overheated feature included!
|
||||||
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= 28)
|
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_OVERHEATING)
|
||||||
{
|
{
|
||||||
// Flugente 12-09-30: ok, this will look really odd, so I'll explain. We have to account for padding of structures. Before map version 30, ObjectData had size 32 due to padding.
|
// Flugente 12-09-30: ok, this will look really odd, so I'll explain. We have to account for padding of structures. Before map version 30, ObjectData had size 32 due to padding.
|
||||||
// Up to ubWireNetworkFlag the size is 28, then bDefuseFrequency adds size 1 - but due to padding, the size was 32. Now, upon adding sRepairThreshold, the size is still 32, as the padded 3 bytes
|
// Up to ubWireNetworkFlag the size is 28, then bDefuseFrequency adds size 1 - but due to padding, the size was 32. Now, upon adding sRepairThreshold, the size is still 32, as the padded 3 bytes
|
||||||
|
|||||||
@@ -41,9 +41,13 @@ class SOLDIERTYPE;
|
|||||||
// SB: new map version, with map dimensions added
|
// SB: new map version, with map dimensions added
|
||||||
#define MAJOR_MAP_VERSION 7.0
|
#define MAJOR_MAP_VERSION 7.0
|
||||||
//Current minor map version updater.
|
//Current minor map version updater.
|
||||||
//#define MINOR_MAP_VERSION 28 // 27 -> 28: increased to 28 because of included weapon overheated and tripwire feature. See ObjectClass for the new Tags!
|
#define MINOR_MAP_OVERHEATING 28 // 27 -> 28: Flugente:: increased to 28 because of included weapon overheated and tripwire feature. See ObjectClass for the new Tags!
|
||||||
//#define MINOR_MAP_VERSION 29 // 28 -> 29: increased range of roomnumbers to full UINT16 by DBrot
|
//#define MINOR_MAP_VERSION 29 // 28 -> 29: increased range of roomnumbers to full UINT16 by DBrot
|
||||||
#define MINOR_MAP_VERSION 30 // 30 -> 29: necessary change due to repair system by Flugente
|
#define MINOR_MAP_REPAIR_SYSTEM 30 // 30 -> 29: Flugente:: necessary change due to repair system
|
||||||
|
#define MINOR_MAP_ITEMFLAG64 31 // 30 -> 31: Flugente: changed sObjectFlag from INT32 to UINT64
|
||||||
|
|
||||||
|
#define MINOR_MAP_VERSION MINOR_MAP_ITEMFLAG64
|
||||||
|
|
||||||
//dnl ch33 230909
|
//dnl ch33 230909
|
||||||
#define VANILLA_MAJOR_MAP_VERSION 5.00
|
#define VANILLA_MAJOR_MAP_VERSION 5.00
|
||||||
#define VANILLA_MINOR_MAP_VERSION 25
|
#define VANILLA_MINOR_MAP_VERSION 25
|
||||||
|
|||||||
Reference in New Issue
Block a user