mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-21 19:32:21 +00:00
SERVER: Allow misc_model to default to missing_model.mdl
This commit is contained in:
parent
567e99d376
commit
876d627fa4
1 changed files with 13 additions and 7 deletions
|
@ -257,15 +257,21 @@ void() misc_model_think =
|
|||
|
||||
void() misc_model =
|
||||
{
|
||||
if (!self.mdl || self.mdl == "") {
|
||||
// NZP: Check for .model instead
|
||||
if (!self.model || self.model == "")
|
||||
objerror("Model not defined");
|
||||
} else {
|
||||
// Convert to .model instead of .mdl
|
||||
// NZ:P Edit -- We use .model instead of .mdl, but keep
|
||||
// compatibility with progs_dump's .mdl
|
||||
if (self.mdl != "")
|
||||
self.model = self.mdl;
|
||||
|
||||
// NZ:P Edit -- No model specified, use our missing/replacement
|
||||
// model.
|
||||
if (self.model == "") {
|
||||
if (cvar("developer))
|
||||
bprint(PRINT_HIGH, "+ [DEV-INFO]: misc_model without model set. Fix this!\n");
|
||||
|
||||
self.model = "models/missing_model.mdl");
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Set default stats.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue