소스 검색

Adds a callback invoke for objects in the scene to inform them if the level is being saved. Allows for certain special actions, like having objects reset to an original position before the save occurs.

Areloch 1 년 전
부모
커밋
9c643a69cf
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.tscript

+ 6 - 0
Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.tscript

@@ -328,7 +328,13 @@ function EditorSaveMission()
    // now write the terrain and mission files out:
 
    if(EWorldEditor.isDirty || ETerrainEditor.isMissionDirty)
+   {
+      //Inform objects a save is happening, in case there is any special pre-save behavior a class needs to do
+      getScene(0).callOnChildren("onSaving", $Server::MissionFile);
+   
       getScene(0).save($Server::MissionFile);
+      
+   }
    if(ETerrainEditor.isDirty)
    {
       // Find all of the terrain files