I think it'll still trash everything at the end of the current map.

On Mon, Jan 14, 2013 at 1:16 AM, Trevor Janok <tja...@comcast.net> wrote:
> After looking, you can call “PrecacheModel” with a preload option.
>
>
>
>          // Add to the server/client lookup/precache table, the specified
> string is given a unique index
>
>          // NOTE: The indices for PrecacheModel are 1 based
>
>          //  a 0 returned from those methods indicates the model or sound
> was not correctly precached
>
>          // However, generic and decal are 0 based
>
>          // If preload is specified, the file is loaded into the
> server/client's cache memory before level startup, otherwise
>
>          //  it'll only load when actually used (which can cause a disk i/o
> hitch if it occurs during play of a level).
>
>          virtual int                        PrecacheModel( const char *s,
> bool preload = false ) = 0;
>
>          virtual int                        PrecacheSentenceFile( const char
> *s, bool preload = false ) = 0;
>
>          virtual int                        PrecacheDecal( const char *name,
> bool preload = false ) = 0;
>
>          virtual int                        PrecacheGeneric( const char *s,
> bool preload = false ) = 0;
>
>
>
> I can read the raw BSP and find all the models needed, and start precaching
> them before the level transitions.
>
> I’ll have to see if it actually saves time when loading the new level.
>
> From: hlcoders-boun...@list.valvesoftware.com
> [mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Pizza
> Sent: Sunday, January 13, 2013 7:45 PM
> To: 'Discussion of Half-Life Programming'
> Subject: Re: [hlcoders] Pre-Loading Maps
>
>
>
> Interesting.
>
>
>
> ________________________________
>
> From: hlcoders-boun...@list.valvesoftware.com
> [mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Trevor Janok
> Sent: Sunday, January 13, 2013 6:55 PM
> To: hlcoders@list.valvesoftware.com
> Subject: [hlcoders] Pre-Loading Maps
>
>
>
> Hello HLCoders.
>
>
>
> I have no idea how Source loads/renders the BSP levels. Since I assume most
> (if not all)  of this is done in the engine which we don’t have access to.
>
> But is there anyway to load a BSP into “memory” so the client can switch
> maps faster?
>
>
>
> I mean, if you’re running on decent hardware Source maps load fast. But it
> would be nice to start “preloading” maps when players near completion of the
> current level.
>
> The gameplay of my mod would help greatly from this, as maps are broken up
> into multiple levels running on a master server.
>
>
>
> I guess I can’t really assume what it’s “preloading” as I’m not sure of what
> Source is doing when it’s switch to a different map.
>
>
>
> Anybody have any insight? Thanks.
>
>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to