more patches from Griever: among other things, lets you select the old

autorifle with a serverinfo
This commit is contained in:
Bill Currie 2003-11-16 00:43:31 +00:00
parent a365e00b22
commit a9251b65b3
5 changed files with 53 additions and 49 deletions

View file

@ -550,7 +550,8 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
targ.armortype = 0; // lost all armor
targ.armorclass = 0; // lost special armor
targ.items = targ.items & ~(IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3);
TeamFortress_SetSpeed(targ);
if (targ.classname == "player")
TeamFortress_SetSpeed(targ);
}
//WK Flags prevent armor damage too
if (T_flags & TF_TD_NOTTEAM)
@ -583,7 +584,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
}
// targ.armorvalue = targ.armorvalue - save;
take = ceil(damage-save);
if (targ.armorvalue > 0 && (targ.armorvalue + save > 100))
if (targ.armorvalue > 0 && (targ.armorvalue + save > 100) && targ.classname == "player")
TeamFortress_SetSpeed(targ); // speed up the less armor you have
}
// add to the damage total for clients, which will be sent as a single

View file

@ -3070,14 +3070,6 @@ else
void(float inp) Menu_Legs_Input =
{
//First, prevent them from getting high speed while upgraded
if (inp < 3 && self.done_custom & CUSTOM_SELLING)
{
sprint(self,PRINT_HIGH,"The upgraded CustomTF soldier is a fighting machine. He doesn't have access to fast legs\n");
self.impulse = 0;
return;
}
//Second, sell off our current legs
if (inp < 8) {
if (self.custom_speed == 650) {

View file

@ -1,11 +1,10 @@
// This file contains defines for some of the messages
#define MSG_INTRO1 "Welcome to ÐÒÏÚÁÃ CustomÔÆ\na Quake ÔÆ MOD by ShakaUVM\nwww®telefragged®com¯shaka"
#define MSG_INTRO2 "Hacked by KK, then SB-1 then OfN, then the Quakeforge team, then Grievre"
#define MSG_INTRO2 "Hacked by KK, then SB-1 then\nOfN, then the Quakeforge team."
//#define MSG_INTRO3 "Get any files needed at:\n\nhttp:\^/\^/quake\^.prozac\^.net\^/"
#define MSG_INTROBAR "\n\n<>žžžžžžžžžžžžžžžžžžžžžžžžžžŸ\n\n"
//, aka óC”
//#define MSG_CUTFVERSION "CustomÔÆ version ö3®2®OfN"
#define MSG_CUTFVERSION "ÐÒÏÚÁÃ CustomÔÆ ö3®2®OfN4-qfcc-GR3"
#define MSG_CUTFVERSION "ÐÒÏÚÁÃ CustomÔÆ For QFCC - cvs"
// Comments CenterPrinted when a player gets the CTF flag
#define MSG_CTF_FLAG_GRAB_TEAM1 "You got the enemy flag!\n\nFlee!"

View file

@ -98,12 +98,15 @@ void() SniperSight_Update =
self.v_angle_z = self.owner.v_angle_z;
local float diff = vlen(self.owner.v_angle - self.v_angle);
self.owner.heat *= 0.9;
self.owner.heat--;
if (diff > 3) diff = 3;
if (self.owner.heat < diff * 8)
self.owner.heat = diff * 8;
local float diff = vlen(self.owner.v_angle - self.v_angle);
if (diff > 10) diff = 10;
local float heat = diff * 0.5 + vlen(self.owner.velocity) * 0.1;
if (self.owner.heat < heat)
self.owner.heat = heat;
self.v_angle = self.owner.v_angle;

View file

@ -1224,9 +1224,15 @@ void() W_FireSniperRifle =
angle = self.v_angle;
if (self.heat < vlen(self.velocity) * 0.1)
self.heat = vlen(self.velocity) * 0.1;
if (!(self.flags & FL_ONGROUND) && self.heat < 100)
self.heat = 100;
if (self.heat > 0) {
angle_x += (random() * 0.18 * self.heat) - (0.09 * self.heat);
angle_y += (random() * 0.18 * self.heat) - (0.09 * self.heat);
angle_x += (random() * 0.08 * self.heat) - (0.04 * self.heat);
angle_y += (random() * 0.08 * self.heat) - (0.04 * self.heat);
}
makevectors(angle);
@ -1254,7 +1260,14 @@ void() W_FireSniperRifle =
}
deathmsg = DMSG_SNIPERRIFLE;
dam_mult = 1;
dam_mult = 0;
local string st = infokey (NIL, "sniper_dmg");
if (st)
dam_mult = stof (st);
if (!dam_mult)
dam_mult = SNIPER_DMG;
//- OfN - float factor to handle OTR bullets difference
if (self.cutf_items & CUTF_OTR && self.ammo_shells > 2) {
@ -1385,30 +1398,32 @@ TeamFortress : W_FireAutoRifle
// same as sniper rifle
void() W_FireAutoRifle =
{
#ifndef OLD_AUTORIFLE
if (self.heat <= 0)
self.heat = 0;
local string st = infokey(NIL, "oldrifle");
self.heat += 5;
if (!(st == "yes" || st == "y" || st == "on" || st == "1")) {
if (self.heat < 50)
self.heat = 50;
if (self.heat > 1000)
self.heat = 1000;
W_FireSniperRifle();
W_FireSniperRifle();
#else
local vector angle;
self.heat += 200;
sound (self ,CHAN_WEAPON, "weapons/sniper.wav", 1, ATTN_NORM);
if (self.heat > 600)
self.heat = 600;
} else {
local vector dir;
KickPlayer(-1, self);
sound (self ,CHAN_WEAPON, "weapons/sniper.wav", 1, ATTN_NORM);
self.currentammo = self.ammo_shells = self.ammo_shells - 1;
KickPlayer(-1, self);
makevectors(self.v_angle);
dir = v_forward;
deathmsg = DMSG_AUTORIFLE;
FireSniperBullet (dir, 8);
#endif
self.currentammo = self.ammo_shells = self.ammo_shells - 1;
makevectors(self.v_angle);
dir = v_forward;
deathmsg = DMSG_AUTORIFLE;
FireSniperBullet (dir, 8);
}
};
/*
@ -2915,7 +2930,7 @@ void() W_Attack =
} else if (self.current_weapon == WEAP_AUTO_RIFLE) {
player_autorifle1();
W_FireAutoRifle();
Attack_Finished(0.2);
Attack_Finished(0.1);
} else if (self.current_weapon == WEAP_ASSAULT_CANNON) {
// Need 4 cells to power up the Assault Cannon
if (self.ammo_cells < 4) {
@ -4073,6 +4088,9 @@ void() W_WeaponFrame =
player_run ();
}
if (self.current_weapon == WEAP_AUTO_RIFLE)
self.heat -= 100;
// check for attack
if (self.button0 && !(self.fire_held_down)) {
if ((self.current_menu == MENU_CLASSHELP) || (self.current_menu == MENU_CLASSHELP2)) {
@ -4081,10 +4099,6 @@ void() W_WeaponFrame =
Attack_Finished(0.2);
} else if (self.current_weapon == WEAP_SNIPER_RIFLE) {
if (self.tfstate & TFSTATE_AIMING) {
self.heat--;
if (self.heat < (vlen(self.velocity) * 0.1))
self.heat = vlen(self.velocity) * 0.1;
if (self.height > 30) {
self.height = self.height - 5;
TF_zoom(self.height);
@ -4096,7 +4110,7 @@ void() W_WeaponFrame =
if (vlen(tv) <= WEAP_SNIPER_RIFLE_MAX_MOVE) {
// create the laser sight
SniperSight_Create(0);
self.heat = 100; // damage done
self.heat = 30; // damage done
// GR no, charging sniper rifle makes no sense, idiot
#ifdef WEINER_SNIPER
self.heat = 80;
@ -4147,11 +4161,6 @@ void() W_WeaponFrame =
TeamFortress_SetSpeed(self);
player_run ();
} else if (self.current_weapon == WEAP_AUTO_RIFLE) {
self.heat *= 0.2;
self.heat -= 1;
if (self.heat < 30)
self.heat = 30; // auto can't be as accurate
}
};