Added checks to avoid crashing in some natives before map start (bug 5119, r=fyren).

This commit is contained in:
Nicholas Hastings
2011-10-11 22:50:21 -04:00
parent 45f68840ed
commit 67163e14e6
6 changed files with 30 additions and 2 deletions
+8 -1
View File
@@ -43,7 +43,7 @@
#include <time.h>
#define SMINTERFACE_SOURCEMOD_NAME "ISourceMod"
#define SMINTERFACE_SOURCEMOD_VERSION 12
#define SMINTERFACE_SOURCEMOD_VERSION 13
/**
* @brief Forward declaration of the KeyValues class.
@@ -311,6 +311,13 @@ namespace SourceMod
* @return SourceHook API version number.
*/
virtual int GetShApiVersion() = 0;
/**
* @brief Returns whether or not a map is currently running.
*
* @return True if a map is currently running, otherwise false.
*/
virtual bool IsMapRunning() = 0;
};
}