Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/game/server/monsters/npcscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ void CMSMonster::Script_Setup()
{
if (!m_ScriptCommands.size())
{
ALERT(at_console, "CMSMonster::Script_Setup\n");

//NPC Commands
m_ScriptCommands.add(scriptcmdname_t("blind")); //Thothie MAR2008b
m_ScriptCommands.add(scriptcmdname_t("invisible")); //Thothie MAR2008b
Expand Down
5 changes: 5 additions & 0 deletions src/game/shared/ms/msscript_apidoc.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

void WriteToFile()
{

}
7 changes: 5 additions & 2 deletions src/game/shared/ms/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ bool GetModelBounds(CBaseEntity* pEntity, Vector Bounds[2]);
#include "crc/crchash.h" //Wishbone MAR2016 - Our CRC function.
#include "findentities.h"
#include <iterator>
//#include <unordered_map>

#undef SCRIPTVAR
#define VecMultiply( a, b ) Vector( a[0] * b[0], a[1] * b[1], a[2] * b[2] ) //Thothie APR2016_25 - seems we need this here too
#define SCRIPTVAR GetVar //A script-wide or global variable
#define SCRIPTCONST( a ) SCRIPTVAR(GetConst(a)) //A const, script-wide, or global variable - loadtime only
#define GETCONST_COMPATIBLE( a ) ( a.c_str()[0] == '$' ? GetConst(a) : SCRIPTCONST(a) ) //Loadtime - Only parse it as a var if it's not a $parser
//int CountPlayers( void );

bool FindSkyHeight(Vector Origin, float& SkyHeight);
bool UnderSky(Vector Origin); //Thothie AUG2010_03
const char* PM_GetValue(msstringlist& Params);
bool GetModelBounds(void* pModel, Vector Bounds[2]);

bool bShouldDumpMSScriptFunctions = false;

CScript::msfunchash_t CScript::m_GlobalCmdHash; // MiB 30NOV_14 Hashed Commands for ScriptCmds.cpp
CScript::msgetterhash_t CScript::m_GlobalGetterHash;
msscripthashhash CScript::mGlobalScriptHashes;
Expand All @@ -56,6 +57,8 @@ ulong CScript::m_gLastLightID; //ID of last dynamic light

void CScript::ScriptGetterHash_Setup()
{
ALERT(at_console, "CScript::ScriptGetterHash_Setup\n");

if (m_GlobalGetterHash.empty())
{
m_GlobalGetterHash["$len"] = scriptcpp_cmdfunc_t(&CScript::ScriptGetter_Len);
Expand Down
4 changes: 4 additions & 0 deletions src/game/shared/ms/script.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
Script.h - Script file implementation

*/

#include <ctime>

extern bool bShouldDumpMSScriptFunctions;

class CEventList : public mslist<LegacyScriptEvent *> //This class was created so I can store Events as pointers, but still access them as
{ //dereferenced objects
public:
Expand Down
2 changes: 2 additions & 0 deletions src/game/shared/weapons/genericitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ void CGenericItemMgr::GenericItemPrecache(void)
//GenericItem script commands (only add once per game):
if (!m_ScriptCommands.size())
{
ALERT(at_console, "CGenericItemMgr::GenericItemPrecache\n");

m_ScriptCommands.add(scriptcmdname_t("wipespells"));
m_ScriptCommands.add(scriptcmdname_t("callownerevent"));
m_ScriptCommands.add(scriptcmdname_t("playanim"));
Expand Down
2 changes: 1 addition & 1 deletion utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (MSVC)
set(CMAKE_SYSTEM_VERSION 10.0)
endif()

project(msr LANGUAGES C CXX)
project(utils LANGUAGES C CXX)

set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)

Expand Down