mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-23 04:32:28 +00:00
Added item replacement code
This commit is contained in:
parent
fad62b7296
commit
2c10f98acf
3 changed files with 104 additions and 12 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.132 2002/12/05 23:11:29 blaze
|
||||
// Added item replacement code
|
||||
//
|
||||
// Revision 1.131 2002/12/02 19:52:05 niceass
|
||||
// water pressure & shell ejection stuff
|
||||
//
|
||||
|
@ -1694,6 +1697,14 @@ extern vmCvar_t cg_RQ3_handcannon;
|
|||
extern vmCvar_t cg_RQ3_m3;
|
||||
extern vmCvar_t cg_RQ3_akimbo;
|
||||
extern vmCvar_t cg_RQ3_grenade;
|
||||
//Blaze: replacement items
|
||||
extern vmCvar_t cg_RQ3_bandolier;
|
||||
extern vmCvar_t cg_RQ3_kevlar;
|
||||
extern vmCvar_t cg_RQ3_silencer;
|
||||
extern vmCvar_t cg_RQ3_laser;
|
||||
extern vmCvar_t cg_RQ3_slippers;
|
||||
extern vmCvar_t cg_RQ3_helmet;
|
||||
|
||||
|
||||
//Blaze: Reaction weapon positions
|
||||
//extern vmCvar_t cg_RQ3_drawWeapon;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.115 2002/12/05 23:11:29 blaze
|
||||
// Added item replacement code
|
||||
//
|
||||
// Revision 1.114 2002/11/18 04:39:47 jbravo
|
||||
// Cleanup of cg_weapons.c
|
||||
//
|
||||
|
@ -406,6 +409,15 @@ vmCvar_t cg_RQ3_m3;
|
|||
vmCvar_t cg_RQ3_akimbo;
|
||||
vmCvar_t cg_RQ3_grenade;
|
||||
|
||||
//Blaze: replacement items
|
||||
vmCvar_t cg_RQ3_bandolier;
|
||||
vmCvar_t cg_RQ3_kevlar;
|
||||
vmCvar_t cg_RQ3_silencer;
|
||||
vmCvar_t cg_RQ3_laser;
|
||||
vmCvar_t cg_RQ3_slippers;
|
||||
vmCvar_t cg_RQ3_helmet;
|
||||
|
||||
|
||||
//Elder: muzzle flash toggle
|
||||
vmCvar_t cg_RQ3_flash;
|
||||
|
||||
|
@ -643,6 +655,14 @@ static cvarTable_t cvarTable[] = { // bk001129
|
|||
{&cg_RQ3_akimbo, "cg_RQ3_akimbo", "akimbo", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_grenade, "cg_RQ3_grenade", "grenade", CVAR_ARCHIVE},
|
||||
|
||||
//Blaze: replacement items
|
||||
{&cg_RQ3_bandolier, "cg_RQ3_bandolier", "bandolier", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_kevlar, "cg_RQ3_kevlar", "kevlar", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_silencer, "cg_RQ3_silencer", "silencer", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_laser, "cg_RQ3_laser", "laser", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_slippers, "cg_RQ3_slippers", "slippers", CVAR_ARCHIVE},
|
||||
{&cg_RQ3_helmet, "cg_RQ3_helmet", "helmet/helmet", CVAR_ARCHIVE},
|
||||
|
||||
// the following variables are created in other parts of the system,
|
||||
// but we also reference them here
|
||||
{&cg_buildScript, "com_buildScript", "0", 0}, // force loading of all possible data amd error on failures
|
||||
|
@ -1875,13 +1895,13 @@ static void CG_RegisterGraphics(void)
|
|||
cgs.media.akimboHandModel = trap_R_RegisterModel("models/weapons2/akimbo/akimbo_hand.md3");
|
||||
|
||||
//Elder: item cache
|
||||
cgs.media.rq3_bandolierModel = trap_R_RegisterModel("models/items/bandolier.md3");
|
||||
cgs.media.rq3_kevlarModel = trap_R_RegisterModel("models/items/kevlar.md3");
|
||||
cgs.media.rq3_silencerModel = trap_R_RegisterModel("models/items/silencer.md3");
|
||||
cgs.media.rq3_laserModel = trap_R_RegisterModel("models/items/laser.md3");
|
||||
cgs.media.rq3_slippersModel = trap_R_RegisterModel("models/items/slippers.md3");
|
||||
cgs.media.rq3_bandolierModel = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_bandolier.string));
|
||||
cgs.media.rq3_kevlarModel = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_kevlar.string));
|
||||
cgs.media.rq3_silencerModel = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_silencer.string));
|
||||
cgs.media.rq3_laserModel = trap_R_RegisterModel(va("models/items/%s.md3", cg_RQ3_laser.string));
|
||||
cgs.media.rq3_slippersModel = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_slippers.string));
|
||||
// JBravo: adding the helmet
|
||||
cgs.media.rq3_helmetModel = trap_R_RegisterModel("models/items/helmet/helmet.md3");
|
||||
cgs.media.rq3_helmetModel = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_helmet.string));
|
||||
|
||||
cgs.media.smoke2 = trap_R_RegisterModel("models/weapons2/shells/s_shell.md3");
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.101 2002/12/05 23:11:29 blaze
|
||||
// Added item replacement code
|
||||
//
|
||||
// Revision 1.100 2002/12/02 19:52:05 niceass
|
||||
// water pressure & shell ejection stuff
|
||||
//
|
||||
|
@ -997,15 +1000,73 @@ void CG_RegisterItemVisuals(int itemNum)
|
|||
if (itemInfo->registered) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
item = &bg_itemlist[itemNum];
|
||||
|
||||
|
||||
memset(itemInfo, 0, sizeof(&itemInfo));
|
||||
itemInfo->registered = qtrue;
|
||||
|
||||
itemInfo->models[0] = trap_R_RegisterModel(item->world_model[0]);
|
||||
|
||||
itemInfo->icon = trap_R_RegisterShader(item->icon);
|
||||
if (item->giType == IT_HOLDABLE)
|
||||
{
|
||||
if (item->giTag == HI_KEVLAR)
|
||||
{
|
||||
itemInfo->models[0] = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_kevlar.string));
|
||||
}
|
||||
if (item->giTag == HI_LASER)
|
||||
{
|
||||
itemInfo->models[0] = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_laser.string));
|
||||
}
|
||||
if (item->giTag == HI_SILENCER)
|
||||
{
|
||||
itemInfo->models[0] = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_silencer.string));
|
||||
}
|
||||
if (item->giTag == HI_BANDOLIER)
|
||||
{
|
||||
itemInfo->models[0] = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_bandolier.string));
|
||||
}
|
||||
if (item->giTag == HI_SLIPPERS)
|
||||
{
|
||||
itemInfo->models[0] = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_slippers.string));
|
||||
}
|
||||
if (item->giTag == HI_HELMET)
|
||||
{
|
||||
itemInfo->models[0] = trap_R_RegisterModel(va("models/items/%s.md3",cg_RQ3_helmet.string));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
itemInfo->models[0] = trap_R_RegisterModel(item->world_model[0]);
|
||||
}
|
||||
if (item->giType == IT_HOLDABLE)
|
||||
{
|
||||
if (item->giTag == HI_KEVLAR)
|
||||
{
|
||||
itemInfo->icon = trap_R_RegisterShader(va("icons/iconi_%s",cg_RQ3_kevlar.string));
|
||||
}
|
||||
if (item->giTag == HI_LASER)
|
||||
{
|
||||
itemInfo->icon = trap_R_RegisterShader(va("icons/iconi_%s",cg_RQ3_laser.string));
|
||||
}
|
||||
if (item->giTag == HI_SILENCER)
|
||||
{
|
||||
itemInfo->icon = trap_R_RegisterShader(va("icons/iconi_%s",cg_RQ3_silencer.string));
|
||||
}
|
||||
if (item->giTag == HI_BANDOLIER)
|
||||
{
|
||||
itemInfo->icon = trap_R_RegisterShader(va("icons/iconi_%s",cg_RQ3_bandolier.string));
|
||||
}
|
||||
if (item->giTag == HI_SLIPPERS)
|
||||
{
|
||||
itemInfo->icon = trap_R_RegisterShader(va("icons/iconi_%s",cg_RQ3_slippers.string));
|
||||
}
|
||||
if (item->giTag == HI_HELMET)
|
||||
{
|
||||
itemInfo->icon = trap_R_RegisterShader(va("icons/iconi_%s",cg_RQ3_helmet.string));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
itemInfo->icon = trap_R_RegisterShader(item->icon);
|
||||
}
|
||||
|
||||
if (item->giType == IT_WEAPON) {
|
||||
CG_RegisterWeapon(item->giTag);
|
||||
|
|
Loading…
Reference in a new issue