mirror of
https://github.com/electronicarts/CnC_Remastered_Collection.git
synced 2025-08-10 16:14:44 +02:00
August 12th Hotfix
Includes fix for infinite loop in FootClass::Detach
This commit is contained in:
@@ -296,6 +296,7 @@ class DLLExportClass {
|
||||
static int CurrentDrawCount;
|
||||
static int TotalObjectCount;
|
||||
static int SortOrder;
|
||||
static int ExportLayer;
|
||||
static CNCObjectListStruct *ObjectList;
|
||||
|
||||
static CNC_Event_Callback_Type EventCallback;
|
||||
@@ -337,6 +338,7 @@ class DLLExportClass {
|
||||
int DLLExportClass::CurrentDrawCount = 0;
|
||||
int DLLExportClass::TotalObjectCount = 0;
|
||||
int DLLExportClass::SortOrder = 0;
|
||||
int DLLExportClass::ExportLayer = 0;
|
||||
CNCObjectListStruct *DLLExportClass::ObjectList = NULL;
|
||||
SidebarGlyphxClass DLLExportClass::MultiplayerSidebars [MAX_PLAYERS];
|
||||
uint64 DLLExportClass::GlyphxPlayerIDs[MAX_PLAYERS] = {0xffffffffl};
|
||||
@@ -2964,7 +2966,11 @@ void DLLExportClass::DLL_Draw_Intercept(int shape_number, int x, int y, int widt
|
||||
|
||||
new_object.CNCInternalObjectPointer = (void*)object;
|
||||
new_object.OccupyListLength = 0;
|
||||
new_object.SortOrder = SortOrder++;
|
||||
if (CurrentDrawCount == 0) {
|
||||
new_object.SortOrder = (ExportLayer << 29) + (object->Sort_Y() >> 3);
|
||||
} else {
|
||||
new_object.SortOrder = ObjectList->Objects[TotalObjectCount].SortOrder + CurrentDrawCount;
|
||||
}
|
||||
|
||||
strncpy(new_object.TypeName, object->Class_Of().IniName, CNC_OBJECT_ASSET_NAME_LENGTH);
|
||||
|
||||
@@ -3332,6 +3338,8 @@ bool DLLExportClass::Get_Layer_State(uint64 player_id, unsigned char *buffer_in,
|
||||
*/
|
||||
for (int layer = 0; layer < DLL_LAYER_COUNT; layer++) {
|
||||
|
||||
ExportLayer = layer;
|
||||
|
||||
for (int index = 0; index < Map.Layer[layer].Count(); index++) {
|
||||
|
||||
ObjectClass *object = Map.Layer[layer][index];
|
||||
|
Reference in New Issue
Block a user