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)
{
case CLASS_BADGUY1:
SET_MODEL(ENT(pev), "models/player/badguy1/badguy1.mdl");
g_ulModelIndexPlayer = pev->modelindex;
pev->sequence = LookupActivity( ACT_IDLE );
break;
case CLASS_BADGUY2:
SET_MODEL(ENT(pev), "models/player/badguy2/badguy2.mdl");
g_ulModelIndexPlayer = pev->modelindex;
pev->sequence = LookupActivity( ACT_IDLE );
break;
}
It works, but when I try to choose the team and class again (i.e. after restarting the map), it changes the team and class, but the model doesn't change. What's the problem?