mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 07:42:15 +00:00
Added replacement model functionality for ammo
This commit is contained in:
parent
a9d2263dd5
commit
88e18b72b7
3 changed files with 95 additions and 17 deletions
|
@ -1,5 +1,6 @@
|
|||
# List fixes here for the 2.3 release
|
||||
|
||||
* Added replacement model functionality for ammo
|
||||
* Bots dont talk about flags any more.
|
||||
* The wepons menu now shows up where its supposed to (incl. TP style TDM)
|
||||
* Grenades now also included in the fixed FF system.
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.136 2003/02/27 08:10:20 jbravo
|
||||
// Added replacement model functionality for ammo
|
||||
//
|
||||
// Revision 1.135 2003/02/16 21:39:09 makro
|
||||
// Fixed "timelimit is read only" on local servers error
|
||||
//
|
||||
|
@ -1735,7 +1738,12 @@ extern vmCvar_t cg_RQ3_silencer_skin;
|
|||
extern vmCvar_t cg_RQ3_laser_skin;
|
||||
extern vmCvar_t cg_RQ3_slippers_skin;
|
||||
extern vmCvar_t cg_RQ3_helmet_skin;
|
||||
|
||||
// JBravo: replacement ammo
|
||||
extern vmCvar_t cg_RQ3_ammo_mk23;
|
||||
extern vmCvar_t cg_RQ3_ammo_shells;
|
||||
extern vmCvar_t cg_RQ3_ammo_ssg3000;
|
||||
extern vmCvar_t cg_RQ3_ammo_mp5;
|
||||
extern vmCvar_t cg_RQ3_ammo_m4;
|
||||
|
||||
//Blaze: Reaction weapon positions
|
||||
//extern vmCvar_t cg_RQ3_drawWeapon;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.122 2003/02/27 08:10:20 jbravo
|
||||
// Added replacement model functionality for ammo
|
||||
//
|
||||
// Revision 1.121 2003/02/25 22:41:14 jbravo
|
||||
// Fixed a bug in item replacements. Removed "Beta" from the version.
|
||||
//
|
||||
|
@ -305,6 +308,11 @@ char RQ3_laser_model[MAX_MODEL_LEN], RQ3_laser_icon[MAX_MODEL_LEN];
|
|||
char RQ3_bandolier_model[MAX_MODEL_LEN], RQ3_bandolier_icon[MAX_MODEL_LEN];
|
||||
char RQ3_slippers_model[MAX_MODEL_LEN], RQ3_slippers_icon[MAX_MODEL_LEN];
|
||||
char RQ3_helmet_model[MAX_MODEL_LEN], RQ3_helmet_icon[MAX_MODEL_LEN];
|
||||
char RQ3_ammo_mk23_model[MAX_MODEL_LEN], RQ3_ammo_mk23_icon[MAX_MODEL_LEN];
|
||||
char RQ3_ammo_shells_model[MAX_MODEL_LEN], RQ3_ammo_shells_icon[MAX_MODEL_LEN];
|
||||
char RQ3_ammo_ssg3000_model[MAX_MODEL_LEN], RQ3_ammo_ssg3000_icon[MAX_MODEL_LEN];
|
||||
char RQ3_ammo_mp5_model[MAX_MODEL_LEN], RQ3_ammo_mp5_icon[MAX_MODEL_LEN];
|
||||
char RQ3_ammo_m4_model[MAX_MODEL_LEN], RQ3_ammo_m4_icon[MAX_MODEL_LEN];
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -467,7 +475,12 @@ vmCvar_t cg_RQ3_silencer_skin;
|
|||
vmCvar_t cg_RQ3_laser_skin;
|
||||
vmCvar_t cg_RQ3_slippers_skin;
|
||||
vmCvar_t cg_RQ3_helmet_skin;
|
||||
|
||||
// JBravo replacement ammo models
|
||||
vmCvar_t cg_RQ3_ammo_mk23;
|
||||
vmCvar_t cg_RQ3_ammo_shells;
|
||||
vmCvar_t cg_RQ3_ammo_ssg3000;
|
||||
vmCvar_t cg_RQ3_ammo_mp5;
|
||||
vmCvar_t cg_RQ3_ammo_m4;
|
||||
|
||||
//Elder: muzzle flash toggle
|
||||
vmCvar_t cg_RQ3_flash;
|
||||
|
@ -731,6 +744,12 @@ static cvarTable_t cvarTable[] = { // bk001129
|
|||
{&cg_RQ3_laser_skin, "cg_RQ3_laser_skin", "default", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_slippers_skin, "cg_RQ3_slippers_skin", "default", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_helmet_skin, "cg_RQ3_helmet_skin", "default", CVAR_ARCHIVE},
|
||||
// JBravo: replacement ammo
|
||||
{&cg_RQ3_ammo_mk23, "cg_RQ3_ammo_mk23", "mk23", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_ammo_shells, "cg_RQ3_ammo_shells", "shells", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_ammo_ssg3000, "cg_RQ3_ammo_ssg3000", "ssg3000", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_ammo_mp5, "cg_RQ3_ammo_mp5", "mp5", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_ammo_m4, "cg_RQ3_ammo_m4", "m4", CVAR_ARCHIVE},
|
||||
|
||||
// the following variables are created in other parts of the system,
|
||||
// but we also reference them here
|
||||
|
@ -2404,6 +2423,56 @@ void CG_ReplaceModels(void)
|
|||
CG_Printf("^1Error loading helmet replacement model %s\n", cg_RQ3_helmet.string);
|
||||
}
|
||||
}
|
||||
if (!strcmp(item->classname, "ammo_mk23") && strcmp(cg_RQ3_ammo_mk23.string, "mk23")) {
|
||||
Com_sprintf(RQ3_ammo_mk23_model, MAX_MODEL_LEN, "models/ammo/%s.md3", cg_RQ3_ammo_mk23.string);
|
||||
Com_sprintf(RQ3_ammo_mk23_icon, MAX_MODEL_LEN, "icons/icona_%s", cg_RQ3_ammo_mk23.string);
|
||||
if (JB_FileExists(RQ3_ammo_mk23_model) && (strlen(RQ3_ammo_mk23_model) < MAX_MODEL_LEN)) {
|
||||
bg_itemlist[item - bg_itemlist].world_model[0] = (char *)&RQ3_ammo_mk23_model;
|
||||
bg_itemlist[item - bg_itemlist].icon = (char *)&RQ3_ammo_mk23_icon;
|
||||
} else {
|
||||
CG_Printf("^1Error loading mk23 ammo replacement model %s\n", cg_RQ3_ammo_mk23.string);
|
||||
}
|
||||
}
|
||||
if (!strcmp(item->classname, "ammo_shells") && strcmp(cg_RQ3_ammo_shells.string, "shells")) {
|
||||
Com_sprintf(RQ3_ammo_shells_model, MAX_MODEL_LEN, "models/ammo/%s.md3", cg_RQ3_ammo_shells.string);
|
||||
Com_sprintf(RQ3_ammo_shells_icon, MAX_MODEL_LEN, "icons/icona_%s", cg_RQ3_ammo_shells.string);
|
||||
if (JB_FileExists(RQ3_ammo_shells_model) && (strlen(RQ3_ammo_shells_model) < MAX_MODEL_LEN)) {
|
||||
bg_itemlist[item - bg_itemlist].world_model[0] = (char *)&RQ3_ammo_shells_model;
|
||||
bg_itemlist[item - bg_itemlist].icon = (char *)&RQ3_ammo_shells_icon;
|
||||
} else {
|
||||
CG_Printf("^1Error loading shells ammo replacement model %s\n", cg_RQ3_ammo_shells.string);
|
||||
}
|
||||
}
|
||||
if (!strcmp(item->classname, "ammo_ssg3000") && strcmp(cg_RQ3_ammo_ssg3000.string, "ssg3000")) {
|
||||
Com_sprintf(RQ3_ammo_ssg3000_model, MAX_MODEL_LEN, "models/ammo/%s.md3", cg_RQ3_ammo_ssg3000.string);
|
||||
Com_sprintf(RQ3_ammo_ssg3000_icon, MAX_MODEL_LEN, "icons/icona_%s", cg_RQ3_ammo_ssg3000.string);
|
||||
if (JB_FileExists(RQ3_ammo_ssg3000_model) && (strlen(RQ3_ammo_ssg3000_model) < MAX_MODEL_LEN)) {
|
||||
bg_itemlist[item - bg_itemlist].world_model[0] = (char *)&RQ3_ammo_ssg3000_model;
|
||||
bg_itemlist[item - bg_itemlist].icon = (char *)&RQ3_ammo_ssg3000_icon;
|
||||
} else {
|
||||
CG_Printf("^1Error loading ssg3000 ammo replacement model %s\n", cg_RQ3_ammo_ssg3000.string);
|
||||
}
|
||||
}
|
||||
if (!strcmp(item->classname, "ammo_mp5") && strcmp(cg_RQ3_ammo_mp5.string, "mp5")) {
|
||||
Com_sprintf(RQ3_ammo_mp5_model, MAX_MODEL_LEN, "models/ammo/%s.md3", cg_RQ3_ammo_mp5.string);
|
||||
Com_sprintf(RQ3_ammo_mp5_icon, MAX_MODEL_LEN, "icons/icona_%s", cg_RQ3_ammo_mp5.string);
|
||||
if (JB_FileExists(RQ3_ammo_mp5_model) && (strlen(RQ3_ammo_mp5_model) < MAX_MODEL_LEN)) {
|
||||
bg_itemlist[item - bg_itemlist].world_model[0] = (char *)&RQ3_ammo_mp5_model;
|
||||
bg_itemlist[item - bg_itemlist].icon = (char *)&RQ3_ammo_mp5_icon;
|
||||
} else {
|
||||
CG_Printf("^1Error loading mp5 ammo replacement model %s\n", cg_RQ3_ammo_mp5.string);
|
||||
}
|
||||
}
|
||||
if (!strcmp(item->classname, "ammo_m4") && strcmp(cg_RQ3_ammo_m4.string, "m4")) {
|
||||
Com_sprintf(RQ3_ammo_m4_model, MAX_MODEL_LEN, "models/ammo/%s.md3", cg_RQ3_ammo_m4.string);
|
||||
Com_sprintf(RQ3_ammo_m4_icon, MAX_MODEL_LEN, "icons/icona_%s", cg_RQ3_ammo_m4.string);
|
||||
if (JB_FileExists(RQ3_ammo_m4_model) && (strlen(RQ3_ammo_m4_model) < MAX_MODEL_LEN)) {
|
||||
bg_itemlist[item - bg_itemlist].world_model[0] = (char *)&RQ3_ammo_m4_model;
|
||||
bg_itemlist[item - bg_itemlist].icon = (char *)&RQ3_ammo_m4_icon;
|
||||
} else {
|
||||
CG_Printf("^1Error loading m4 ammo replacement model %s\n", cg_RQ3_ammo_m4.string);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue