1
0
forked from mirrors/0ad

On-demand loading of actors (sort of)

This was SVN commit r2017.
This commit is contained in:
Ykkrosh
2005-03-19 11:55:27 +00:00
parent 219509f00f
commit 79da4bf050
14 changed files with 199 additions and 168 deletions
-18
View File
@@ -50,24 +50,6 @@ template<> JSObject* ToScript<CBaseEntity*>( CBaseEntity** Native )
return( ToScript<CBaseEntity>( *Native ) );
}
// CObjectEntry
template<> bool ToPrimitive<CObjectEntry>( JSContext* cx, jsval v, CObjectEntry*& Storage )
{
CStrW ActorName;
if( !ToPrimitive<CStrW>( cx, v, ActorName ) )
return( false );
Storage = g_ObjMan.FindObject( (CStr)ActorName );
return( true );
}
template<> jsval ToJSVal<CObjectEntry>( CObjectEntry*& Native )
{
if( !Native )
return( ToJSVal<CStrW>( CStrW( L"[No actor]" ) ) );
return( ToJSVal<CStrW>( CStrW( Native->m_Name ) ) );
}
// CVector3D
template<> CVector3D* ToNative<CVector3D>( JSContext* cx, JSObject* obj )