djcev.com

//

Git Repos / fte_dogmode / qc / custom_mdls.qc

Last update to this file was on 2024-06-15 at 19:50.

Show custom_mdls.qc

//==============================================================================
// MAPPER-SETTABLE CUSTOM MODELS FOR MONSTERS
//==============================================================================

//======================================================================
// fields -- custom models -- dumptruck_ds
//======================================================================

#ifdef SSQC
.string mdl_head;
.string mdl_body;
.string mdl_proj; // projectile
.string mdl_exproj; // explosive projectile
.float skin_head;
.float skin_proj; // projectile
.float skin_exproj; // explosive projectile
.string mdl_gib1;
.string mdl_gib2;
.string mdl_gib3;

.vector mdlsz; // additions by bmFbr for custom bbox
.vector centeroffset;
#endif

//======================================================================
// forward declarations
//======================================================================

#ifdef SSQC
void(entity e, .string mdl_field, string default_file) precache_model_custom;
void(entity e, string default_file) precache_head_model;
void(entity e, string default_file) precache_body_model;
void(entity e, string default_file) precache_proj_model;
void(entity e, string default_file) precache_gib1;
void(entity e, string default_file) precache_gib2;
void(entity e, string default_file) precache_gib3;
void(entity e, .string mdl_field, string default_file) precache_model2_custom;
void(entity e, string default_file) precache_head_model2;
void(entity e, string default_file) precache_body_model2;
void(entity e, string default_file) precache_proj_model2;
void(entity e, string default_file) precache_exproj_model2;
void(entity e, .string mdl_field, string default_file) model_custom;
void(entity e, string default_file) body_model;
// void(entity e, string default_file) head_model;
void(entity e, string default_file) proj_model;
#endif

//------------------------------------------------------------------------------

#ifdef SSQC
//----------------------------------------------------------------------
// precache_model_custom
//----------------------------------------------------------------------
void(entity e, .string mdl_field, string default_file) precache_model_custom =
{
if (e.mdl_field != "")
precache_model (e.mdl_field);
else
precache_model (default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_head_model =
{
precache_model_custom (e, mdl_head, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_body_model =
{
precache_model_custom (e, mdl_body, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_proj_model =
{
precache_model_custom (e, mdl_proj, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_gib1 =
{
precache_model_custom (e, mdl_gib1, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_gib2 =
{
precache_model_custom (e, mdl_gib2, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_gib3 =
{
precache_model_custom (e, mdl_gib3, default_file);
};

//----------------------------------------------------------------------
// precache_model2_custom
//----------------------------------------------------------------------
void(entity e, .string mdl_field, string default_file) precache_model2_custom =
{
if (e.mdl_field != "")
precache_model2 (e.mdl_field);
else
precache_model2 (default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_head_model2 =
{
precache_model2_custom (e, mdl_head, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_body_model2 =
{
precache_model2_custom (e, mdl_body, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_proj_model2 =
{
precache_model2_custom (e, mdl_proj, default_file);
};

//----------------------------------------------------------------------
void(entity e, string default_file) precache_exproj_model2 =
{
precache_model2_custom (e, mdl_exproj, default_file);
};

//----------------------------------------------------------------------
// model_custom
//----------------------------------------------------------------------
void(entity e, .string mdl_field, string default_file) model_custom =
{
if (e.mdl_field != "")
{
setmodel (e, e.mdl_field);
// dprint ("CUSTOM MODEL LOADED\n");
}
else
{
setmodel (e, default_file);
}
};

//----------------------------------------------------------------------
void(entity e, string default_file) body_model =
{
model_custom (e, mdl_body, default_file);
};

/*
//----------------------------------------------------------------------
void(entity e, string default_file) head_model =
{
model_custom (e, mdl_head, default_file);
};
*/

//----------------------------------------------------------------------
void(entity e, string default_file) proj_model =
{
model_custom (e, mdl_proj, default_file);
};
#endif

Return to the top of this page or return to the overview of this repo.

Log custom_mdls.qc

Date Commit Message Author + -
2024-06-15 Major update, committing as-is, will have bugs cev +6  
2024-03-24 2nd pass refactor, rework QC class structure cev +79 -36
2023-12-02 More refactoring & moving, begin adding mdls & snd cev +86 -37
2023-10-13 Rename "qc-server" dir to "qc" cev +70  

Return to the top of this page or return to the overview of this repo.