File diff r23729:25d4f6828003 → r23730:3b11f535de42
src/script/script_instance.hpp
Show inline comments
 
@@ -195,12 +195,14 @@ public:
 
	 * Check if the instance is sleeping, which either happened because the
 
	 *  script executed a DoCommand, executed this.Sleep() or it has been
 
	 *  paused.
 
	 */
 
	bool IsSleeping() { return this->suspend != 0; }
 

	
 
	size_t GetAllocatedMemory() const;
 

	
 
protected:
 
	class Squirrel *engine;               ///< A wrapper around the squirrel vm.
 
	const char *versionAPI;               ///< Current API used by this script.
 

	
 
	/**
 
	 * Register all API functions to the VM.
 
@@ -238,12 +240,13 @@ private:
 
	bool is_started;                      ///< Is the scripts constructor executed?
 
	bool is_dead;                         ///< True if the script has been stopped.
 
	bool is_save_data_on_stack;           ///< Is the save data still on the squirrel stack?
 
	int suspend;                          ///< The amount of ticks to suspend this script before it's allowed to continue.
 
	bool is_paused;                       ///< Is the script paused? (a paused script will not be executed until unpaused)
 
	Script_SuspendCallbackProc *callback; ///< Callback that should be called in the next tick the script runs.
 
	size_t last_allocated_memory;         ///< Last known allocated memory value (for display for crashed scripts)
 

	
 
	/**
 
	 * Call the script Load function if it exists and data was loaded
 
	 *  from a savegame.
 
	 */
 
	bool CallLoad();