mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Mapbase v6.0
- Fixed path_track paths saving as pointers instead of handles - Fixed player animations not falling to base class correctly - Fixed logic_externaldata creating garbage in trailing spaces - Added "SetHandModelSkin" input - Added unique colors for various types of console message, adjustable via convars - Added the ability to use map-specific weapon scripts - Added a way to display (placeholder) text entirely from Faceposer scenes - Added "autobreak" keyvalue to game_text, which automatically breaks long text into different lines - Added the ability to change a game_text's font (very limited) - Added LightToggle input to point_spotlight - Added Enable/DisableSprites on npc_manhack - Added ai_goal_police behavior from metrocops to Combine soldiers and citizens - Added func_precipitation particle rain systems from the Alien Swarm SDK - Added new func_precipitation spawnflags for controlling behavior in particle types - Added "mapbase_version" cvar which shows the version of Mapbase a mod might be running on - Fixed an oversight with NPC crouch activities which was causing npc_metropolice to stop firing in standoffs - Added toggleable patches to npc_combine AI which make soldiers less likely to stand around without shooting or rush to melee when not needed - Added key for custom logo font on env_credits scripts - Added SetSpeed and SetPushDir inputs for trigger_push - Added a bunch of I/O/KV to func_fish_pool to allow for more control over the fish - Added OnLostEnemy/Player support for npc_combine_camera - Added enhanced save/restore for the Response System, toggleable via convar - Added a convar which allows users to disable weapon autoswitching when picking up ammo - Split VScript base script into its own file - Added VScript descriptions for NPC squads and the manager class which handles them - Moved several classes, functions, etc. to the VScript library itself for future usage in other projects, like VBSP - Added VScript to VBSP with basic map file interfacing - Made some VScript documentation more clear due to deprecation of online documentation - Added VScript "hook" registration, creating a standardized system which shows up in script_help documentation - Added VScript-driven custom weapons - Added clientside VScript scopes - Added a bunch of weapon-related VScript functions - Split a bunch of cluttered VScript stuff into different files - Added VScript functions for "following" entities/bonemerging - Added VScript functions for grenades - Added a few more VScript trigger functions - Added OnDeath hook for VScript - Fixed documentation for aliased functions in VScript - Fixed $bumpmask not working on SDK_LightmappedGeneric - Made vertex blend swapping in Hammer use a constant instead of a combo (makes it easier to compile the shader, especially for $bumpmask's sake) - Fixed brush phong, etc. causing SDK_WorldVertexTransition to stop working - Added limited support for $envmapmask in the bumpmapping shader - Fixed more issues with parallax corrected cubemaps and instances - Made instance variable recursion consistent with VMFII
This commit is contained in:
@@ -297,6 +297,8 @@ public:
|
||||
#ifdef MAPBASE
|
||||
void InputSetText ( inputdata_t &inputdata );
|
||||
void SetText( const char* pszStr );
|
||||
|
||||
void InputSetFont( inputdata_t &inputdata ) { m_strFont = inputdata.value.StringID(); }
|
||||
#endif
|
||||
|
||||
void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
|
||||
@@ -308,6 +310,11 @@ private:
|
||||
|
||||
string_t m_iszMessage;
|
||||
hudtextparms_t m_textParms;
|
||||
|
||||
#ifdef MAPBASE
|
||||
string_t m_strFont;
|
||||
bool m_bAutobreak;
|
||||
#endif
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( game_text, CGameText );
|
||||
@@ -327,12 +334,18 @@ BEGIN_DATADESC( CGameText )
|
||||
DEFINE_KEYFIELD( m_textParms.holdTime, FIELD_FLOAT, "holdtime" ),
|
||||
DEFINE_KEYFIELD( m_textParms.fxTime, FIELD_FLOAT, "fxtime" ),
|
||||
|
||||
#ifdef MAPBASE
|
||||
DEFINE_KEYFIELD( m_strFont, FIELD_STRING, "font" ),
|
||||
DEFINE_KEYFIELD( m_bAutobreak, FIELD_BOOLEAN, "autobreak" ),
|
||||
#endif
|
||||
|
||||
DEFINE_ARRAY( m_textParms, FIELD_CHARACTER, sizeof(hudtextparms_t) ),
|
||||
|
||||
// Inputs
|
||||
DEFINE_INPUTFUNC( FIELD_VOID, "Display", InputDisplay ),
|
||||
#ifdef MAPBASE
|
||||
DEFINE_INPUTFUNC( FIELD_STRING, "SetText", InputSetText ),
|
||||
DEFINE_INPUTFUNC( FIELD_STRING, "SetFont", InputSetFont ),
|
||||
#endif
|
||||
|
||||
END_DATADESC()
|
||||
@@ -385,7 +398,11 @@ void CGameText::Display( CBaseEntity *pActivator )
|
||||
|
||||
if ( MessageToAll() )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
UTIL_HudMessageAll( m_textParms, MessageGet(), STRING(m_strFont), m_bAutobreak );
|
||||
#else
|
||||
UTIL_HudMessageAll( m_textParms, MessageGet() );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -393,12 +410,20 @@ void CGameText::Display( CBaseEntity *pActivator )
|
||||
if ( gpGlobals->maxClients == 1 )
|
||||
{
|
||||
CBasePlayer *pPlayer = UTIL_GetLocalPlayer();
|
||||
#ifdef MAPBASE
|
||||
UTIL_HudMessage( pPlayer, m_textParms, MessageGet(), STRING(m_strFont), m_bAutobreak );
|
||||
#else
|
||||
UTIL_HudMessage( pPlayer, m_textParms, MessageGet() );
|
||||
#endif
|
||||
}
|
||||
// Otherwise show the message to the player that triggered us.
|
||||
else if ( pActivator && pActivator->IsNetClient() )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
UTIL_HudMessage( ToBasePlayer( pActivator ), m_textParms, MessageGet(), STRING(m_strFont), m_bAutobreak );
|
||||
#else
|
||||
UTIL_HudMessage( ToBasePlayer( pActivator ), m_textParms, MessageGet() );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -417,7 +442,7 @@ void CGameText::SetText( const char* pszStr )
|
||||
CUtlStringList vecLines;
|
||||
Q_SplitString( pszStr, "/n", vecLines );
|
||||
|
||||
char szMsg[256];
|
||||
char szMsg[512];
|
||||
Q_strncpy( szMsg, vecLines[0], sizeof( szMsg ) );
|
||||
|
||||
for (int i = 1; i < vecLines.Count(); i++)
|
||||
|
||||
Reference in New Issue
Block a user