set sv_spectator_speed_multiplier 1.5
seta sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
seta sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
-seta sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1"
-seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1"
+seta sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
+seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1; can be overriden by :<skinnumber> suffix in sv_defaultplayermodel"
seta sv_defaultplayermodel_red "" "\"\" means see sv_defaultplayermodel"
seta sv_defaultplayerskin_red 0
seta sv_defaultplayermodel_blue "" "\"\" means see sv_defaultplayermodel"
self.frags = FRAGS_SPECTATOR;
}
+.float model_randomizer;
void FixPlayermodel()
{
string defaultmodel;
- float defaultskin, chmdl, oldskin;
+ float defaultskin, chmdl, oldskin, n, i;
vector m1, m2;
defaultmodel = "";
- if(autocvar_sv_defaultcharacter == 1) {
+ if(autocvar_sv_defaultcharacter == 1)
+ {
defaultskin = 0;
if(teamplay)
defaultmodel = autocvar_sv_defaultplayermodel;
defaultskin = autocvar_sv_defaultplayerskin;
}
+
+ n = tokenize_console(defaultmodel);
+ if(n > 0)
+ defaultmodel = argv(floor(n * self.model_randomizer));
+
+ i = strstrofs(defaultmodel, ":", 0);
+ if(i >= 0)
+ {
+ defaultskin = stof(substring(defaultmodel, i+1, -1));
+ defaultmodel = substring(defaultmodel, 0, i);
+ }
}
if(self.modelindex == 0 && self.deadflag == DEAD_NO)
if(!autocvar_g_campaign)
Send_CSQC_Centerprint_Generic(self, CPID_MOTD, getwelcomemessage(), autocvar_welcome_message_time, 0);
+
+ self.model_randomizer = random();
}
/*