--
[ Picked text/plain from multipart/alternative ]
Hey Maarten, are you precaching the model on the client only like I am or
are you precaching on the server which in turn precaches on the client and
creates an index for the model which is shared between the client and server
engine.
I am setting up a custom player model thing like Half-Life 1 Tony.
Its odd that the interp is the only issue, but it seems like the interp is
working from our tests and nothing seems to be wrong. I hit the engine on my
tests so I'm getting no where.
On 8/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> And what prevents you to do just that? [ I see we got a PrecacheModel call
> in c_sdk_player.cpp 's Spawn() method before the already present Precache,
> it's been a while since I coded it though ]. I'm pretty sure since I
> hijack the modelindex clientside the server never needs to know of the
> existence of this model. [ except if precaching needs to be consistent
> between client & server or something like that, I never looked into the
> mechanism, but it would seem illogical to me ]
>
> > --
> > [ Picked text/plain from multipart/alternative ]
> > For our idea we need the client side to precache the model since the
> model
> > wont necessarily exist on the server side.
> >
> > On 8/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >>
> >> We did something similar for our alien vision, since the alien sees all
> >> humans as skeletons, but the other humans have normal vision.
> >>
> >> Basically I just hijacked the modelindex, I added a receiveproxy for
> the
> >> modelindex, and when the conditions are right, I change it to the
> >> modelindex of the skeleton model ( which I precached before together
> >> with
> >> the player models). All other updates still work fine :)
> >>
> >> hth,
> >>
> >> -- maarten
> >>
> >> > --
> >> > [ Picked text/plain from multipart/alternative ]
> >> > Hey Half-Life 2 coders!
> >> >
> >> > I have a question about models on the client and server, specifically
> >> what
> >> > is required to have a different model than the server but keep things
> >> > running smoothly.
> >> > I have managed to get the client side player model different than the
> >> > server
> >> > side model. At this point I only need the server side to be static,
> >> and
> >> > only
> >> > for animation updates etc for the client. The rigs on the models on
> >> the
> >> > client and server are the same including the hitbox model, the only
> >> > difference would be that the client side will use its own mesh
> >> different
> >> > from the server. The problem is by having a player model different
> >> from
> >> > the
> >> > server on other clients, the model no longer updates its origin,
> >> angles,
> >> > or
> >> > animation. Turning interpolation off fixes the problem but
> >> interpolation
> >> > is
> >> > important. :P
> >> > Anyway, we are still working on this but if anyone has had this
> >> problem
> >> > before and knows what changes on the client are required to have a
> >> > different
> >> > model then the server but keep the interpolation intact, we would be
> >> most
> >> > greatful.
> >> >
> >> > Here is the code we use for changing the client side model, the code
> I
> >> > haven't included is mostly changes to prevent the client from
> updating
> >> the
> >> > model in a server update.
> >> >
> >> > This function is in void C_HL2MP_Player::ClientThink( void ) so it
> >> happens
> >> > a
> >> > lot.
> >> > Just checking if the player is requesting a client model change.
> >> > if ( Q_strcmp( m_cMyCurrentModel, m_szClientModel ) != 0 )
> >> > {
> >> > // Precache Model.
> >> > model_t *m_pPlayerModel = (model_t *) engine->LoadModel(
> >> > m_szClientModel );
> >> >
> >> > if ( m_pPlayerModel == NULL )
> >> > {
> >> > // If NULL then change to a static model which comes with
> >> the
> >> > mod.
> >> > m_pPlayerModel = (model_t *) engine->LoadModel(
> >> > "models/Player/Male_01.mdl" );
> >> > }
> >> >
> >> > // Clear out and renew.
> >> > DestroyModelInstance();
> >> >
> >> > SetModelPointer( m_pPlayerModel );
> >> > // Copy for model change check.
> >> > Q_strcpy( m_cMyCurrentModel, m_szClientModel );
> >> > }
> >> >
> >> > This is called on new model atm, creates a new model instance for
> >> decals
> >> > and
> >> > such as it should.
> >> > CStudioHdr *C_HL2MP_Player::OnNewModel( void )
> >> > {
> >> > CStudioHdr *hdr = BaseClass::OnNewModel();
> >> >
> >> > Initialize( );
> >> > CreateModelInstance();
> >> >
> >> > return hdr;
> >> > }
> >> >
> >> > Anything else you need to know please ask.
> >> >
> >> > Thanks all :)
> >> > --
> >> >
> >> > _______________________________________________
> >> > To unsubscribe, edit your list preferences, or view the list
> archives,
> >> > please visit:
> >> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> _______________________________________________
> >> To unsubscribe, edit your list preferences, or view the list archives,
> >> please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >>
> >
> >
> > --
> > ~skidz
> > --
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--
~skidz
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders