Mapbase v4.2

- Added keyvalue to use random bounds on logic_timer to limit AddToTimer/SubtractFromTimer inputs (suggested by White_Red_Dragons)
- Fixed inconsistent env_projectedtexture state on save/load
- Added code to allow skybox to use a direct entity handle instead of a stored origin and angles in order to take advantage of entity interpolation while moving (less jittering)
- Moved map-specific file manifest parsing to happen after other entities are created (highly experimental)
- Added various misc. code improvements related to debug build and MP branch
- Fixed some VScript ammo type-related code forgotten in the previous update
- Added more VScript functions to CBaseAnimating, including pose parameter functions and the ability to look up bones and get bone position
- Added more origin and angles functions for VScript (suggested by krassell)
This commit is contained in:
Blixibon
2020-07-01 19:32:49 +00:00
parent bc6a35a99c
commit f636089003
24 changed files with 380 additions and 120 deletions

View File

@@ -85,6 +85,11 @@ class CSceneListManager : public CLogicalEntity
DECLARE_CLASS( CSceneListManager, CLogicalEntity );
public:
DECLARE_DATADESC();
#ifdef MAPBASE_VSCRIPT
DECLARE_ENT_SCRIPTDESC();
HSCRIPT ScriptGetScene( int iIndex );
#endif
virtual void Activate( void );
@@ -5198,14 +5203,6 @@ HSCRIPT ScriptCreateSceneEntity( const char* pszScene )
return ToHScript( pScene );
}
#ifdef MAPBASE
CON_COMMAND(mapbase_scene_precache, "Just work")
{
DevMsg("Attempting to precache %s...\n", args[1]);
PrecacheInstancedScene(args[1]);
}
#endif
//-----------------------------------------------------------------------------
// Purpose: Used for precaching instanced scenes
// Input : *pszScene -
@@ -6069,6 +6066,14 @@ BEGIN_DATADESC( CSceneListManager )
DEFINE_INPUTFUNC( FIELD_VOID, "Shutdown", InputShutdown ),
END_DATADESC()
#ifdef MAPBASE_VSCRIPT
BEGIN_ENT_SCRIPTDESC( CSceneListManager, CBaseEntity, "Stores choreo scenes and cleans them up when a later scene in the list begins playing." )
DEFINE_SCRIPTFUNC_NAMED( ScriptGetScene, "GetScene", "Gets the specified scene index from this manager." )
END_SCRIPTDESC();
#endif
//-----------------------------------------------------------------------------
// Purpose:
@@ -6211,6 +6216,19 @@ void CSceneListManager::RemoveScene( int iIndex )
}
}
#ifdef MAPBASE_VSCRIPT
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
HSCRIPT CSceneListManager::ScriptGetScene( int iIndex )
{
if ( iIndex < 0 || iIndex >= SCENE_LIST_MANAGER_MAX_SCENES )
return NULL;
return ToHScript( m_hScenes[iIndex] );
}
#endif
void ReloadSceneFromDisk( CBaseEntity *ent )
{
CSceneEntity *scene = dynamic_cast< CSceneEntity * >( ent );