![]() |
SET_MODEL() thingy...
Well... I have been making a little mod for some time to waste my time and to get some modding skills, and now I have ran into a problem:
In my mod, I'm using a some sort of a class system. Every class has a different model. In CBasePlayer::Spawn() I'm setting the model like this: Code:
switch (player_class) |
Re: SET_MODEL() thingy...
Ok, It works now. There's no need to use SET_MODEL for every model.
Code:
switch (player_class) |
Re: SET_MODEL() thingy...
actually i wonder what you're doing. Although i am not a sdk guru, i find this sound weird:
Code:
g_engfuncs.pfnSetClientKeyValue( entindex(), g_engfuncs.pfnGetInfoKeyBuffer( edict() ), "model", "badguy2"); Code:
SET_MODEL( ENT(pev), "models/player.mdl"); You said it works, but i wonder what SET_MODEL does then? :) Just askin 8) |
Re: SET_MODEL() thingy...
Quote:
SET_MODEL( ENT(pev), "models/player.mdl"); |
Re: SET_MODEL() thingy...
it's normal, Akz does it the right way.
Try pmtools on the players in Counter-Strike, you'll see that ALL players, no matter what team/class they are, have "models/player.mdl" in pEdict->v.model The skin is given into the client's infobuffer (which is something different) That's normal, because the server doesn't *need* to know what skin the players have. For the server, all players play with the models/player.mdl model. This way, it's much faster, and the bounding boxes are the same anyway. The infobuffer is just a client thingy, so that the client is able to display each player with the right skin... but from the server's point of view, this is just cosmetics. The game could as well run with only gordon freeman's shooting at each other, it wouldn't give a shit :P You need to feel BOTH the client's infobuffer AND the player edict's model field. The first one is for all the clients, the last one is for the server only. |
All times are GMT +2. The time now is 13:19. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.