mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 08:57:09 +00:00
Fully implemented delete, added an easy-to-use ID lookup system for undo commands, fixed a bunch of crashes when undoing/redoing after creating/deleting an object
This commit is contained in:
@@ -292,3 +292,15 @@ void CScriptCooker::WriteLayer(EGame Game, CScriptLayer *pLayer, IOutputStream&
|
||||
else
|
||||
Cooker.WriteLayerMP2(pLayer);
|
||||
}
|
||||
|
||||
void CScriptCooker::CookInstance(EGame Game, CScriptObject *pInstance, IOutputStream& rOut)
|
||||
{
|
||||
CScriptCooker Cooker;
|
||||
Cooker.mpSCLY = &rOut;
|
||||
Cooker.mVersion = Game;
|
||||
|
||||
if (Game <= ePrime)
|
||||
Cooker.WriteInstanceMP1(pInstance);
|
||||
else
|
||||
Cooker.WriteInstanceMP2(pInstance);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class CScriptCooker
|
||||
|
||||
public:
|
||||
static void WriteLayer(EGame Game, CScriptLayer *pLayer, IOutputStream& rOut);
|
||||
static void CookInstance(EGame Game, CScriptObject *pInstance, IOutputStream& rOut);
|
||||
};
|
||||
|
||||
#endif // CSCRIPTCOOKER_H
|
||||
|
||||
Reference in New Issue
Block a user