mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Mapbase v5.1
- Fixed a major oversight in Source 2013 which was causing some code to think all logic entities were worldspawn - Added WIP background nodraw for point_cameras set to not draw skybox at all - Fixed map-specific talker not flushing on restore - Added optional HUD hint to code-based game instructor hints - Added workaround for suspicious crashes in HL2 NPC rappelling code (reported by 1upD) - Made antlions summoned by npc_antlionguard report as dead when removed with the "Kill" input - Fixed math_mod not saving mod value (reported by Klems) - Added SDK_WindowImposter, which uses the SteamPipe cubemap bug workaround and includes support for parallax corrected cubemaps - Updated thirdpartylegalnotices.txt to mention the Squirrel API - Fixed incorrect type checking for script instances in VScript - Added a bunch of new misc. VScript constants - Added a few new base VScript functions - Added a separate "Clientside Script Language" keyvalue to worldspawn for VScript, allowing client scripts to use a different language from server scripts - Fixed worldspawn crashing the game when running entity scripts (reported by krassell) - Fixed manifests creating a second worldspawn, allowing them to function properly in HL2 - Added tons of remapping-related fixes for instances and manifests, including node IDs and overlay remapping - Added a keyvalue to func_instance which allows vector axis lines to be remapped properly - Added support for manifest root path instances in VBSP - Added missing PrintBrushContents() contents to VBSP - Added -nohiddenmaps parameter - Made manifest cordon somewhat functional
This commit is contained in:
@@ -168,6 +168,18 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void RefreshCustomTalker()
|
||||
{
|
||||
#ifdef GAME_DLL
|
||||
if (g_bMapContainsCustomTalker && mapbase_flush_talker.GetBool())
|
||||
{
|
||||
DevMsg("Mapbase: Reloading response system to flush custom talker\n");
|
||||
ReloadResponseSystem();
|
||||
g_bMapContainsCustomTalker = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void LevelInitPreEntity()
|
||||
{
|
||||
#ifdef GAME_DLL
|
||||
@@ -193,26 +205,17 @@ public:
|
||||
}
|
||||
gameinfo->deleteThis();
|
||||
|
||||
|
||||
#ifdef GAME_DLL
|
||||
if (g_bMapContainsCustomTalker && mapbase_flush_talker.GetBool())
|
||||
{
|
||||
DevMsg("Mapbase: Reloading response system to flush custom talker\n");
|
||||
ReloadResponseSystem();
|
||||
g_bMapContainsCustomTalker = false;
|
||||
}
|
||||
|
||||
g_MapName = STRING(gpGlobals->mapname);
|
||||
#else
|
||||
//char mapname[128];
|
||||
//Q_StripExtension(MapName(), mapname, sizeof(mapname));
|
||||
g_MapName = MapName();
|
||||
#endif
|
||||
RefreshMapName();
|
||||
|
||||
// Shared Mapbase localization file
|
||||
g_pVGuiLocalize->AddFile( "resource/mapbase_%language%.txt" );
|
||||
}
|
||||
|
||||
virtual void OnRestore()
|
||||
{
|
||||
RefreshMapName();
|
||||
}
|
||||
|
||||
virtual void LevelInitPostEntity()
|
||||
{
|
||||
// Check for a generic "mapname_manifest.txt" file and load it.
|
||||
@@ -242,6 +245,27 @@ public:
|
||||
virtual void LevelShutdownPostEntity()
|
||||
{
|
||||
g_MapName = NULL;
|
||||
|
||||
RefreshCustomTalker();
|
||||
}
|
||||
|
||||
bool RefreshMapName()
|
||||
{
|
||||
#ifdef GAME_DLL
|
||||
const char *pszMapName = STRING(gpGlobals->mapname);
|
||||
#else
|
||||
//char mapname[128];
|
||||
//Q_StripExtension(MapName(), mapname, sizeof(mapname));
|
||||
const char *pszMapName = MapName();
|
||||
#endif
|
||||
|
||||
if (g_MapName == NULL || !FStrEq(pszMapName, g_MapName))
|
||||
{
|
||||
g_MapName = pszMapName;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "c_ai_basenpc.h"
|
||||
#else
|
||||
#include "ai_basenpc.h"
|
||||
#include "globalstate.h"
|
||||
#endif
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
@@ -244,6 +245,41 @@ void RegisterSharedScriptConstants()
|
||||
ScriptRegisterConstant( g_pScriptVM, COLLISION_GROUP_NPC_ACTOR, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, COLLISION_GROUP_NPC_SCRIPTED, "" );
|
||||
|
||||
//
|
||||
// Flags
|
||||
//
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_ONGROUND, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_DUCKING, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_WATERJUMP, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_ONTRAIN, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_INRAIN, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_FROZEN, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_ATCONTROLS, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_CLIENT, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_FAKECLIENT, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_INWATER, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_FLY, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_SWIM, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_CONVEYOR, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_NPC, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_GODMODE, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_NOTARGET, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_AIMTARGET, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_PARTIALGROUND, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_STATICPROP, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_GRAPHED, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_GRENADE, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_STEPMOVEMENT, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_DONTTOUCH, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_BASEVELOCITY, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_WORLDBRUSH, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_OBJECT, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_KILLME, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_ONFIRE, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_DISSOLVING, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_TRANSRAGDOLL, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, FL_UNBLOCKABLE_BY_PLAYER, "" );
|
||||
|
||||
//
|
||||
// Entity Flags
|
||||
//
|
||||
@@ -416,5 +452,35 @@ void RegisterSharedScriptConstants()
|
||||
ScriptRegisterConstant( g_pScriptVM, bits_CAP_DOORS_GROUP, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, bits_CAP_RANGE_ATTACK_GROUP, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, bits_CAP_MELEE_ATTACK_GROUP, "" );
|
||||
|
||||
//
|
||||
// Misc. AI
|
||||
//
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_INVALID, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_NONE, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_IDLE, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_ALERT, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_COMBAT, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_SCRIPT, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_PLAYDEAD, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_PRONE, "When in clutches of barnacle" );
|
||||
ScriptRegisterConstant( g_pScriptVM, NPC_STATE_DEAD, "" );
|
||||
|
||||
ScriptRegisterConstantNamed( g_pScriptVM, CAI_BaseNPC::SCRIPT_PLAYING, "SCRIPT_PLAYING", "Playing the action animation." );
|
||||
ScriptRegisterConstantNamed( g_pScriptVM, CAI_BaseNPC::SCRIPT_WAIT, "SCRIPT_WAIT", "Waiting on everyone in the script to be ready. Plays the pre idle animation if there is one." );
|
||||
ScriptRegisterConstantNamed( g_pScriptVM, CAI_BaseNPC::SCRIPT_POST_IDLE, "SCRIPT_POST_IDLE", "Playing the post idle animation after playing the action animation." );
|
||||
ScriptRegisterConstantNamed( g_pScriptVM, CAI_BaseNPC::SCRIPT_CLEANUP, "SCRIPT_CLEANUP", "Cancelling the script / cleaning up." );
|
||||
ScriptRegisterConstantNamed( g_pScriptVM, CAI_BaseNPC::SCRIPT_WALK_TO_MARK, "SCRIPT_WALK_TO_MARK", "Walking to the scripted sequence position." );
|
||||
ScriptRegisterConstantNamed( g_pScriptVM, CAI_BaseNPC::SCRIPT_RUN_TO_MARK, "SCRIPT_RUN_TO_MARK", "Running to the scripted sequence position." );
|
||||
ScriptRegisterConstantNamed( g_pScriptVM, CAI_BaseNPC::SCRIPT_PLAYING, "SCRIPT_PLAYING", "Moving to the scripted sequence position while playing a custom movement animation." );
|
||||
#endif
|
||||
|
||||
//
|
||||
// Misc. General
|
||||
//
|
||||
#ifdef GAME_DLL
|
||||
ScriptRegisterConstant( g_pScriptVM, GLOBAL_OFF, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, GLOBAL_ON, "" );
|
||||
ScriptRegisterConstant( g_pScriptVM, GLOBAL_DEAD, "" );
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user