> But doesn't that assume you set the model yourself with the "SET_MODEL"
> command, and precache it?
>
> What I'm trying to avoid is precaching ALL of our player models, which
> would mean:
> 1) Only server-defined player models could be used. This isn't an issue
> because I restrict the models client-side anyway through model
> encryption.
> 2) It would take up 40+Mb of memory for models that it never use.
>
> Right now my code does:
>
> char *szModel = "paladin"; // For instance...
> SET_MODEL( ENT(pev), "models/player.mdl" );
> g_engfuncs.pfnSetClientKeyValue( entindex(),
> g_engfuncs.pfnGetInfoKeyBuffer( edict() ), "model", szModel );
>
> ...but what does that have to do with "developer 0"?
>
> For the record, I set a breakpoint inside the client-side rendering code
> and, sure enough, "model/player.mdl" is the entity being rendered. Is
> this some safety feature in Half-Life?
>
> Tnx & Rgds...
> David Flor
> Lead Programmer, "The Opera" - http://opera.redeemedsoft.com/

Seems everypne has some problems with this :} Here are a couple of things I have
found that have not been mentioned yet:

1: Search for, and comment out, every reference to g_ulModelIndexPlayer
    This little bugger resets the reference model for every player to that of the
last player spawned :/

file://pev->modelindex = g_ulModelIndexPlayer;    // don't use eyes

I have noted no negative effects of removing this...I'm sure someone will tell me
if it is evil :}

2: Make sure you use a custom name for the player model

 SET_CLIENT_KEYVALUE (entindex(), GET_INFO_BUFFER (edict()), "model",
"swarm_zombie");

If you use names that match the standard HL DM player names, then you _may_ get a
conflict when it looks for the model. I noted this when we had a zombie model in
the headcrab directory, it continued to use the origan HL DM zombie, even though
we had the PS2 zombie model, much cooler! As soon as I changed the model name in
the call to SET_CLIENT_KEYVALUE the problem resolved, even though the name we set
did not match the name of the model, or the directory it was found in.

Hope this helps i some way.

Jeff.

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

Reply via email to