mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-17 09:34:02 +00:00
Fixed server chrasing on incorrect models in TP and also added default skins
This commit is contained in:
parent
e27fd2e410
commit
f2926f055a
2 changed files with 38 additions and 5 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.27 2002/05/13 07:29:14 jbravo
|
||||
// Fixed server chrasing on incorrect models in TP and also added default skins
|
||||
//
|
||||
// Revision 1.26 2002/05/11 15:40:41 slicer
|
||||
// Changed cg_RQ3_<team count> cvars to ui_RQ3_ and added a synch system for these
|
||||
//
|
||||
|
@ -726,7 +729,12 @@ static void CG_LoadClientInfo( clientInfo_t *ci ) {
|
|||
Q_strncpyz(teamname, DEFAULT_REDTEAM_NAME, sizeof(teamname) );
|
||||
}
|
||||
if ( !CG_RegisterClientModelname( ci, DEFAULT_TEAM_MODEL, ci->skinName, DEFAULT_TEAM_HEAD, ci->skinName, teamname ) ) {
|
||||
CG_Error( "DEFAULT_TEAM_MODEL / skin (%s/%s) failed to register", DEFAULT_TEAM_MODEL, ci->skinName );
|
||||
if (ci->team == TEAM_BLUE)
|
||||
Q_strncpyz (ci->skinName, "cyrus", sizeof (ci->skinName));
|
||||
else
|
||||
Q_strncpyz (ci->skinName, "chowda", sizeof (ci->skinName));
|
||||
if (!CG_RegisterClientModelname( ci, DEFAULT_TEAM_MODEL, ci->skinName, DEFAULT_TEAM_HEAD, ci->skinName, teamname))
|
||||
CG_Error( "DEFAULT_TEAM_MODEL / skin (%s/%s) failed to register", DEFAULT_TEAM_MODEL, ci->skinName);
|
||||
}
|
||||
} else {
|
||||
if ( !CG_RegisterClientModelname( ci, DEFAULT_MODEL, DEFAULT_SKIN, DEFAULT_MODEL, DEFAULT_SKIN, teamname ) ) {
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.74 2002/05/13 07:29:14 jbravo
|
||||
// Fixed server chrasing on incorrect models in TP and also added default skins
|
||||
//
|
||||
// Revision 1.73 2002/05/10 13:21:53 makro
|
||||
// Mainly bot stuff. Also fixed a couple of crash bugs
|
||||
//
|
||||
|
@ -973,11 +976,33 @@ void ClientUserinfoChanged( int clientNum ) {
|
|||
|
||||
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||
if (client->sess.sessionTeam == TEAM_RED) {
|
||||
Com_sprintf (model, sizeof (model) , "%s", g_RQ3_team1model.string);
|
||||
Com_sprintf (headModel, sizeof (headModel) , "%s", g_RQ3_team1model.string);
|
||||
Q_strncpyz(model2, g_RQ3_team1model.string, sizeof(model));
|
||||
skin2 = Q_strrchr(model2, '/');
|
||||
if (skin2) {
|
||||
*skin2++ = '\0';
|
||||
} else {
|
||||
skin2 = "chowda";
|
||||
}
|
||||
if (RQ3_Validatemodel(model2)) {
|
||||
Com_sprintf (model, sizeof (model) , "%s/%s", model2, skin2);
|
||||
Com_sprintf (headModel, sizeof (headModel) , "%s/%s", model2, skin2);
|
||||
} else {
|
||||
Com_sprintf (model, sizeof (model) , "grunt/chowda");
|
||||
}
|
||||
} else {
|
||||
Com_sprintf (model, sizeof (model) , "%s", g_RQ3_team2model.string);
|
||||
Com_sprintf (headModel, sizeof (headModel) , "%s", g_RQ3_team2model.string);
|
||||
Q_strncpyz(model2, g_RQ3_team2model.string, sizeof(model));
|
||||
skin2 = Q_strrchr(model2, '/');
|
||||
if (skin2) {
|
||||
*skin2++ = '\0';
|
||||
} else {
|
||||
skin2 = "cyrus";
|
||||
}
|
||||
if (RQ3_Validatemodel(model2)) {
|
||||
Com_sprintf (model, sizeof (model) , "%s/%s", model2, skin2);
|
||||
Com_sprintf (headModel, sizeof (headModel) , "%s/%s", model2, skin2);
|
||||
} else {
|
||||
Com_sprintf (model, sizeof (model) , "grunt/cyrus");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// NiceAss: temporary hack to prevent non-grunt models:
|
||||
|
|
Loading…
Reference in a new issue