Adding helmet

This commit is contained in:
Richard Allen 2002-10-30 20:04:34 +00:00
parent 4f2ae27006
commit 229aa6fe8c
15 changed files with 195 additions and 31 deletions

Binary file not shown.

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.69 2002/10/30 20:04:33 jbravo
// Adding helmet
//
// Revision 1.68 2002/08/25 07:09:00 niceass // Revision 1.68 2002/08/25 07:09:00 niceass
// added "life" setting to func_pressure // added "life" setting to func_pressure
// //
@ -217,7 +220,8 @@ static void CG_UseItem(centity_t * cent)
trap_S_StartSound(NULL, es->number, CHAN_BODY, cgs.media.useNothingSound); trap_S_StartSound(NULL, es->number, CHAN_BODY, cgs.media.useNothingSound);
break; break;
case HI_TELEPORTER: // JBravo: getting rid of NON RQ3 items.
/* case HI_TELEPORTER:
break; break;
case HI_MEDKIT: case HI_MEDKIT:
@ -227,7 +231,7 @@ static void CG_UseItem(centity_t * cent)
ci->medkitUsageTime = cg.time; ci->medkitUsageTime = cg.time;
} }
trap_S_StartSound(NULL, es->number, CHAN_BODY, cgs.media.medkitSound); trap_S_StartSound(NULL, es->number, CHAN_BODY, cgs.media.medkitSound);
break; break; */
} }
} }

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.129 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.128 2002/10/21 21:01:09 niceass // Revision 1.128 2002/10/21 21:01:09 niceass
// no ref ready code // no ref ready code
// //
@ -1246,6 +1249,8 @@ typedef struct {
qhandle_t rq3_silencerModel; qhandle_t rq3_silencerModel;
qhandle_t rq3_laserModel; qhandle_t rq3_laserModel;
qhandle_t rq3_slippersModel; qhandle_t rq3_slippersModel;
// JBravo: the helmet
qhandle_t rq3_helmetModel;
// weapon effect shaders // weapon effect shaders
qhandle_t railExplosionShader; qhandle_t railExplosionShader;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.113 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.112 2002/10/20 21:24:32 blaze // Revision 1.112 2002/10/20 21:24:32 blaze
// Added cg_rq3_gunname cvars. These can be used to choose weapon replacements. You will need 3 icons that I will upload to the ftp. These should go in the next pk3 // Added cg_rq3_gunname cvars. These can be used to choose weapon replacements. You will need 3 icons that I will upload to the ftp. These should go in the next pk3
// //
@ -1874,6 +1877,8 @@ static void CG_RegisterGraphics(void)
cgs.media.rq3_silencerModel = trap_R_RegisterModel("models/items/silencer.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_laserModel = trap_R_RegisterModel("models/items/laser.md3");
cgs.media.rq3_slippersModel = trap_R_RegisterModel("models/items/slippers.md3"); cgs.media.rq3_slippersModel = trap_R_RegisterModel("models/items/slippers.md3");
// JBravo: adding the helmet
cgs.media.rq3_helmetModel = trap_R_RegisterModel("models/items/helmet/helmet.md3");
cgs.media.smoke2 = trap_R_RegisterModel("models/weapons2/shells/s_shell.md3"); cgs.media.smoke2 = trap_R_RegisterModel("models/weapons2/shells/s_shell.md3");

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.46 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.45 2002/10/26 00:37:18 jbravo // Revision 1.45 2002/10/26 00:37:18 jbravo
// New multiple item code and added PB support to the UI // New multiple item code and added PB support to the UI
// //
@ -652,6 +655,21 @@ Only in CTF games
"", "",
""} ""}
, ,
// JBravo: adding Helmet
{
"item_helmet",
"sound/items/slippers.wav",
{"models/items/helmet/helmet.md3",
0, 0, 0}
,
"icons/iconi_helmet",
RQ3_HELMET_NAME,
0,
IT_HOLDABLE,
HI_HELMET,
"",
""}
,
// end of list marker // end of list marker
{NULL} {NULL}
}; };
@ -1490,6 +1508,8 @@ itemAlias_t itemAliases[] = {
{RQ3_LASER_NAME, HI_LASER}, {RQ3_LASER_NAME, HI_LASER},
{"laser", HI_LASER}, {"laser", HI_LASER},
{RQ3_SILENCER_NAME, HI_SILENCER}, {RQ3_SILENCER_NAME, HI_SILENCER},
{RQ3_HELMET_NAME, HI_HELMET},
{"helmet", HI_HELMET},
{NULL, HI_KEVLAR} {NULL, HI_KEVLAR}
}; };

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.98 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.97 2002/09/29 16:06:44 jbravo // Revision 1.97 2002/09/29 16:06:44 jbravo
// Work done at the HPWorld expo // Work done at the HPWorld expo
// //
@ -358,6 +361,7 @@
#define RQ3_BANDOLIER_NAME "Bandolier" #define RQ3_BANDOLIER_NAME "Bandolier"
#define RQ3_KEVLAR_NAME "Kevlar Vest" #define RQ3_KEVLAR_NAME "Kevlar Vest"
#define RQ3_LASER_NAME "Lasersight" #define RQ3_LASER_NAME "Lasersight"
#define RQ3_HELMET_NAME "Kevlar Helmet"
enum { enum {
LIGHTS, LIGHTS,
@ -829,16 +833,18 @@ typedef enum {
HI_NONE, HI_NONE,
//TODO: remove the baseQ3 ones //TODO: remove the baseQ3 ones
HI_TELEPORTER, // JBravo: dat wuz an easy one :)
/* HI_TELEPORTER,
HI_MEDKIT, HI_MEDKIT,
HI_KAMIKAZE, HI_KAMIKAZE,
HI_PORTAL, HI_PORTAL,
HI_INVULNERABILITY, HI_INVULNERABILITY, */
HI_KEVLAR, HI_KEVLAR,
HI_LASER, HI_LASER,
HI_SILENCER, HI_SILENCER,
HI_BANDOLIER, HI_BANDOLIER,
HI_SLIPPERS, HI_SLIPPERS,
HI_HELMET,
HI_NUM_HOLDABLE HI_NUM_HOLDABLE
} holdable_t; } holdable_t;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.93 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.92 2002/10/26 22:03:43 jbravo // Revision 1.92 2002/10/26 22:03:43 jbravo
// Made TeamDM work RQ3 style. // Made TeamDM work RQ3 style.
// //
@ -988,12 +991,19 @@ void ThrowItem(gentity_t * ent)
xr_drop->count = -1; xr_drop->count = -1;
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_SILENCER); client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_SILENCER);
client->uniqueItems--; client->uniqueItems--;
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_HELMET)) {
xr_item = BG_FindItemForHoldable(HI_HELMET);
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
xr_drop->count = -1;
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_HELMET);
client->uniqueItems--;
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_LASER)) { } else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_LASER)) {
xr_item = BG_FindItemForHoldable(HI_LASER); xr_item = BG_FindItemForHoldable(HI_LASER);
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM); xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);
xr_drop->count = -1; xr_drop->count = -1;
client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_LASER); client->ps.stats[STAT_HOLDABLE_ITEM] &= ~(1 << HI_LASER);
client->uniqueItems--; client->uniqueItems--;
// JBravo: adding the helmet :)
} else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_KEVLAR)) { } else if (client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_KEVLAR)) {
xr_item = BG_FindItemForHoldable(HI_KEVLAR); xr_item = BG_FindItemForHoldable(HI_KEVLAR);
xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM); xr_drop = dropWeapon(ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM);

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.175 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.174 2002/10/26 22:03:43 jbravo // Revision 1.174 2002/10/26 22:03:43 jbravo
// Made TeamDM work RQ3 style. // Made TeamDM work RQ3 style.
// //
@ -738,7 +741,12 @@ void Cmd_Give_f(gentity_t * ent)
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SILENCER); ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SILENCER);
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_BANDOLIER); ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_BANDOLIER);
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SLIPPERS); ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_SLIPPERS);
ent->client->uniqueItems = 5; if (g_RQ3_haveHelmet.integer) {
ent->client->ps.stats[STAT_HOLDABLE_ITEM] |= (1 << HI_HELMET);
ent->client->uniqueItems = 6;
} else {
ent->client->uniqueItems = 5;
}
} }
if (give_all || Q_stricmp(name, "ammo") == 0) { if (give_all || Q_stricmp(name, "ammo") == 0) {

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.131 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.130 2002/10/26 22:03:43 jbravo // Revision 1.130 2002/10/26 22:03:43 jbravo
// Made TeamDM work RQ3 style. // Made TeamDM work RQ3 style.
// //
@ -2193,29 +2196,55 @@ void G_Damage(gentity_t * targ, gentity_t * inflictor, gentity_t * attacker,
case LOCATION_HEAD: case LOCATION_HEAD:
if (attacker->client && ((g_gametype.integer == GT_TEAMPLAY && level.team_round_going) || g_gametype.integer != GT_TEAMPLAY)) if (attacker->client && ((g_gametype.integer == GT_TEAMPLAY && level.team_round_going) || g_gametype.integer != GT_TEAMPLAY))
attacker->client->pers.records[REC_HEADSHOTS]++; attacker->client->pers.records[REC_HEADSHOTS]++;
//save headshot time for player_die // JBravo: helmet stuff
targ->client->headShotTime = level.time; if ((targ->client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_HELMET)) &&
mod != MOD_SNIPER && mod != MOD_KNIFE && mod != MOD_KNIFE_THROWN) {
//Elder: reusing line so we don't have to declare more variables trap_SendServerCommand(attacker - g_entities,
line[0] = line[1] = 0; va("print \"%s has a Kevlar Helmet - AIM FOR THE BODY!\n\"",
line[2] = 20; targ->client->pers.netname));
trap_SendServerCommand(attacker - g_entities, trap_SendServerCommand(targ - g_entities,
va("print \"You hit %s^7 in the head.\n\"", va("print \"Kevlar Helmet absorbed a part of %s's shot\n\"",
targ->client->pers.netname)); attacker->client->pers.netname));
trap_SendServerCommand(targ - g_entities, va("print \"Head Damage.\n\"")); tent = G_TempEntity(targ->s.pos.trBase, EV_BULLET_HIT_KEVLAR);
//Setup headshot spray and sound
//Only do if not knife or SSG -- SSG has its own trail of blood
if (mod != MOD_SNIPER && mod != MOD_KNIFE && mod != MOD_KNIFE_THROWN) {
VectorAdd(targ->s.pos.trBase, line, line);
tent = G_TempEntity(line, EV_HEADSHOT);
tent->s.eventParm = DirToByte(dir); tent->s.eventParm = DirToByte(dir);
tent->s.otherEntityNum = targ->s.clientNum; take = (take / 2);
targ->client->kevlarHit = qtrue;
instant_dam = 1;
bleeding = 0;
} else if ((targ->client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_HELMET)) &&
mod == MOD_SNIPER) {
trap_SendServerCommand(attacker - g_entities,
va("print \"%s has a Kevlar Helmet, too bad you have AP rounds...\n\"",
targ->client->pers.netname));
trap_SendServerCommand(targ - g_entities,
va("print \"Kevlar Helmet absorbed some of %s's AP sniper round\n\"",
attacker->client->pers.netname));
take = (take * 0.325);
instant_dam = 1;
bleeding = 1;
} else {
//save headshot time for player_die
targ->client->headShotTime = level.time;
line[0] = line[1] = 0;
line[2] = 20;
trap_SendServerCommand(attacker - g_entities,
va("print \"You hit %s^7 in the head.\n\"",
targ->client->pers.netname));
trap_SendServerCommand(targ - g_entities, va("print \"Head Damage.\n\""));
//Setup headshot spray and sound
//Only do if not knife or SSG -- SSG has its own trail of blood
if (mod != MOD_SNIPER && mod != MOD_KNIFE && mod != MOD_KNIFE_THROWN) {
VectorAdd(targ->s.pos.trBase, line, line);
tent = G_TempEntity(line, EV_HEADSHOT);
tent->s.eventParm = DirToByte(dir);
tent->s.otherEntityNum = targ->s.clientNum;
}
// JBravo: order is important
take = (take * 1.8) + 1;
break;
} }
// JBravo: order is important
take = (take * 1.8) + 1;
//take *= 1.8 + 1;
break;
case LOCATION_CHEST: case LOCATION_CHEST:
if (attacker->client && ((g_gametype.integer == GT_TEAMPLAY && level.team_round_going) || g_gametype.integer != GT_TEAMPLAY)) if (attacker->client && ((g_gametype.integer == GT_TEAMPLAY && level.team_round_going) || g_gametype.integer != GT_TEAMPLAY))
attacker->client->pers.records[REC_CHESTSHOTS]++; attacker->client->pers.records[REC_CHESTSHOTS]++;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.54 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.53 2002/10/29 01:34:52 jbravo // Revision 1.53 2002/10/29 01:34:52 jbravo
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support. // Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
// //
@ -1094,6 +1097,9 @@ void ClearRegisteredItems(void)
RegisterItem(BG_FindItemForHoldable(HI_SILENCER)); RegisterItem(BG_FindItemForHoldable(HI_SILENCER));
RegisterItem(BG_FindItemForHoldable(HI_BANDOLIER)); RegisterItem(BG_FindItemForHoldable(HI_BANDOLIER));
RegisterItem(BG_FindItemForHoldable(HI_LASER)); RegisterItem(BG_FindItemForHoldable(HI_LASER));
// JBravo: adding the helmet
if (g_RQ3_haveHelmet.integer)
RegisterItem(BG_FindItemForHoldable(HI_HELMET));
//Makro - all weapons should be loaded in teamplay //Makro - all weapons should be loaded in teamplay
//JBravo: and CTF //JBravo: and CTF
if (g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_CTF || g_gametype.integer == GT_TEAM) { if (g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_CTF || g_gametype.integer == GT_TEAM) {
@ -1466,6 +1472,7 @@ void RQ3_DroppedItemThink(gentity_t * ent)
case HI_SILENCER: case HI_SILENCER:
case HI_BANDOLIER: case HI_BANDOLIER:
case HI_SLIPPERS: case HI_SLIPPERS:
case HI_HELMET:
RQ3_ResetItem(ent->item->giTag); RQ3_ResetItem(ent->item->giTag);
G_FreeEntity(ent); G_FreeEntity(ent);
break; break;
@ -1505,6 +1512,7 @@ void RQ3_ResetItem(int itemTag)
case HI_SILENCER: case HI_SILENCER:
case HI_BANDOLIER: case HI_BANDOLIER:
case HI_SLIPPERS: case HI_SLIPPERS:
case HI_HELMET:
//Free entity and reset position in unique item array //Free entity and reset position in unique item array
//level.uniqueItemsUsed &= ~(1 << ent->item->giTag); //level.uniqueItemsUsed &= ~(1 << ent->item->giTag);
rq3_item = BG_FindItemForHoldable(itemTag); rq3_item = BG_FindItemForHoldable(itemTag);

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.130 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.129 2002/10/29 01:34:52 jbravo // Revision 1.129 2002/10/29 01:34:52 jbravo
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support. // Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
// //
@ -1391,6 +1394,7 @@ extern vmCvar_t g_RQ3_ctb_respawndelay; // JBravo: delay in seconds for ctb resp
extern vmCvar_t g_RQ3_allWeapons; // JBravo: if set, TP/DM players get all the weapons extern vmCvar_t g_RQ3_allWeapons; // JBravo: if set, TP/DM players get all the weapons
extern vmCvar_t g_RQ3_allItems; // JBravo: if set, TP/DM players get all the items extern vmCvar_t g_RQ3_allItems; // JBravo: if set, TP/DM players get all the items
extern vmCvar_t g_RQ3_tdmMode; // JBravo: Which TDM mode do we want? extern vmCvar_t g_RQ3_tdmMode; // JBravo: Which TDM mode do we want?
extern vmCvar_t g_RQ3_haveHelmet; // JBravo: Is the helmet active on the server ?
//Slicer: Team Status Cvars for MM //Slicer: Team Status Cvars for MM
//extern vmCvar_t g_RQ3_team1ready; //extern vmCvar_t g_RQ3_team1ready;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.126 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.125 2002/10/29 01:34:52 jbravo // Revision 1.125 2002/10/29 01:34:52 jbravo
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support. // Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
// //
@ -461,6 +464,7 @@ vmCvar_t g_RQ3_ctb_respawndelay;
vmCvar_t g_RQ3_allWeapons; vmCvar_t g_RQ3_allWeapons;
vmCvar_t g_RQ3_allItems; vmCvar_t g_RQ3_allItems;
vmCvar_t g_RQ3_tdmMode; vmCvar_t g_RQ3_tdmMode;
vmCvar_t g_RQ3_haveHelmet;
// aasimon: Ref System for MM // aasimon: Ref System for MM
vmCvar_t g_RQ3_AllowRef; vmCvar_t g_RQ3_AllowRef;
@ -605,6 +609,7 @@ static cvarTable_t gameCvarTable[] = {
{&g_RQ3_allWeapons, "g_RQ3_allWeapons", "0", CVAR_ARCHIVE, 0, qtrue}, {&g_RQ3_allWeapons, "g_RQ3_allWeapons", "0", CVAR_ARCHIVE, 0, qtrue},
{&g_RQ3_allItems, "g_RQ3_allItems", "0", CVAR_ARCHIVE, 0, qtrue}, {&g_RQ3_allItems, "g_RQ3_allItems", "0", CVAR_ARCHIVE, 0, qtrue},
{&g_RQ3_tdmMode, "g_RQ3_tdmMode", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_SYSTEMINFO, 0, qtrue}, {&g_RQ3_tdmMode, "g_RQ3_tdmMode", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_SYSTEMINFO, 0, qtrue},
{&g_RQ3_haveHelmet, "g_RQ3_haveHelmet", "0", CVAR_ARCHIVE, 0, qtrue},
{&g_RQ3_idleaction, "g_RQ3_idleaction", "0", CVAR_ARCHIVE, 0, qtrue}, {&g_RQ3_idleaction, "g_RQ3_idleaction", "0", CVAR_ARCHIVE, 0, qtrue},
{&g_RQ3_weaponban, "g_RQ3_weaponban", "511", CVAR_ARCHIVE, 0, qtrue}, {&g_RQ3_weaponban, "g_RQ3_weaponban", "511", CVAR_ARCHIVE, 0, qtrue},
//Blaze: let cvar.cfg be set by the server admins //Blaze: let cvar.cfg be set by the server admins
@ -2607,6 +2612,13 @@ void RQ3_StartUniqueItems(void)
rq3_temp = (gentity_t *) SelectRandomDeathmatchSpawnPoint(); rq3_temp = (gentity_t *) SelectRandomDeathmatchSpawnPoint();
Drop_Item(rq3_temp, rq3_item, angle); Drop_Item(rq3_temp, rq3_item, angle);
angle += 30; angle += 30;
if (g_RQ3_haveHelmet.integer) {
rq3_item = BG_FindItemForHoldable(HI_HELMET);
rq3_temp = (gentity_t *) SelectRandomDeathmatchSpawnPoint();
Drop_Item(rq3_temp, rq3_item, angle);
angle += 30;
}
} }
/* /*

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.52 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.51 2002/08/25 23:19:31 niceass // Revision 1.51 2002/08/25 23:19:31 niceass
// possible fix for ghost door problem // possible fix for ghost door problem
// //
@ -1153,6 +1156,7 @@ void Blocked_Door(gentity_t * ent, gentity_t * other)
case HI_KEVLAR: case HI_KEVLAR:
case HI_SILENCER: case HI_SILENCER:
case HI_SLIPPERS: case HI_SLIPPERS:
case HI_HELMET:
RQ3_DroppedItemThink(other); RQ3_DroppedItemThink(other);
return; return;
break; break;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.144 2002/10/30 20:04:34 jbravo
// Adding helmet
//
// Revision 1.143 2002/10/29 01:34:52 jbravo // Revision 1.143 2002/10/29 01:34:52 jbravo
// Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support. // Added g_RQ3_tdmMode (0 = TP style, 1 = DM style) including UI support.
// //
@ -748,6 +751,7 @@ void CleanLevel()
case HI_SILENCER: case HI_SILENCER:
case HI_BANDOLIER: case HI_BANDOLIER:
case HI_SLIPPERS: case HI_SLIPPERS:
case HI_HELMET:
G_FreeEntity(ent); G_FreeEntity(ent);
break; break;
default: default:
@ -1091,6 +1095,13 @@ void RQ3_Cmd_Choose_f(gentity_t * ent)
} else if (Q_stricmp(cmd, RQ3_BANDOLIER_NAME) == 0 || Q_stricmp(cmd, "bandolier") == 0) { } else if (Q_stricmp(cmd, RQ3_BANDOLIER_NAME) == 0 || Q_stricmp(cmd, "bandolier") == 0) {
ent->client->teamplayItem = HI_BANDOLIER; ent->client->teamplayItem = HI_BANDOLIER;
trap_SendServerCommand(ent - g_entities, va("print \"Item selected: %s\n\"", RQ3_BANDOLIER_NAME)); trap_SendServerCommand(ent - g_entities, va("print \"Item selected: %s\n\"", RQ3_BANDOLIER_NAME));
} else if (Q_stricmp(cmd, RQ3_HELMET_NAME) == 0 || Q_stricmp(cmd, "helmet") == 0) {
if (g_RQ3_haveHelmet.integer) {
ent->client->teamplayItem = HI_HELMET;
trap_SendServerCommand(ent - g_entities, va("print \"Item selected: %s\n\"", RQ3_HELMET_NAME));
} else {
trap_SendServerCommand(ent - g_entities, va("print \"%s is disabled on this server.\n\"", RQ3_HELMET_NAME));
}
} else { } else {
trap_SendServerCommand(ent - g_entities, va("print \"Invalid weapon or item choice.\n\"")); trap_SendServerCommand(ent - g_entities, va("print \"Invalid weapon or item choice.\n\""));
return; return;
@ -1848,6 +1859,9 @@ void GetItemName(gentity_t * ent, char *buf)
} else if (ent->client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_LASER)) { } else if (ent->client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_LASER)) {
strcpy(buf, RQ3_LASER_NAME); strcpy(buf, RQ3_LASER_NAME);
return; return;
} else if (ent->client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_HELMET)) {
strcpy(buf, RQ3_HELMET_NAME);
return;
} else { } else {
strcpy(buf, "No Item"); strcpy(buf, "No Item");
} }

View file

@ -142,6 +142,24 @@
action { play "sound/misc/menu1.wav" ; exec "choose bandolier" ; close ingame_item } action { play "sound/misc/menu1.wav" ; exec "choose bandolier" ; close ingame_item }
} }
itemdef {
name "helmet"
shortcutKey "6"
rect 120 148 128 16
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_BUTTON
textstyle ITEM_TEXTSTYLE_SHADOWED
textscale .225
textalign ITEM_ALIGN_LEFT
textalignx 8
textaligny 12
text "6. Kevlar Helmet"
forecolor 1 1 1 1
visible 1
onFocus { hide items ; show "it_helmet" }
action { play "sound/misc/menu1.wav" ; exec "choose helmet" ; close ingame_item }
}
//Item preview //Item preview
//Background //Background
@ -184,9 +202,9 @@
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
type ITEM_TYPE_MODEL type ITEM_TYPE_MODEL
asset_model "models/items/laser.md3" asset_model "models/items/laser.md3"
model_origin 24 0 0 model_origin 24 15 0
model_fovx 60 model_fovx 40
model_fovy 60 model_fovy 40
//textscale .75 //textscale .75
model_rotation 10 model_rotation 10
model_angles 270 75 90 model_angles 270 75 90
@ -202,8 +220,8 @@
type ITEM_TYPE_MODEL type ITEM_TYPE_MODEL
asset_model "models/items/silencer.md3" asset_model "models/items/silencer.md3"
model_origin 20 0 0 model_origin 20 0 0
model_fovx 60 model_fovx 40
model_fovy 60 model_fovy 40
//textscale .75 //textscale .75
model_rotation 10 model_rotation 10
model_angles 270 105 90 model_angles 270 105 90
@ -245,5 +263,22 @@
visible 0 visible 0
} }
itemdef {
name it_helmet
group items
rect 16 48 96 96
style WINDOW_STYLE_EMPTY
type ITEM_TYPE_MODEL
asset_model "models/items/helmet/helmet.md3"
model_origin 30 0 0
model_fovx 20
model_fovy 20
//textscale .75
model_rotation 10
model_angles 180 0 0
decoration
visible 0
}
} }
} }