mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-23 20:52:29 +00:00
Various fixes to bring things "up to par". It should all work now :)
This commit is contained in:
parent
5da92f9b0a
commit
376eba2f8d
10 changed files with 62 additions and 54 deletions
2
ai.qc
2
ai.qc
|
@ -12,7 +12,7 @@ void() demon1_fire1;
|
|||
#define AI_TRANQ_FACTOR_UP 2
|
||||
#define AI_TRANQ_FACTOR_DN 3
|
||||
|
||||
void(entity etemp, entity stemp1, entity stemp2, float dmg) T_Damage;
|
||||
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
|
||||
|
||||
//- OfN -
|
||||
float() WizardCheckAttack;
|
||||
|
|
|
@ -379,7 +379,7 @@ void(entity targ, entity inflictor, entity attacker, float damage, float T_flags
|
|||
{
|
||||
if (self.invincible_sound < time)
|
||||
{
|
||||
sound (targ, #CHAN_ITEM, "auras/aura1.wav", 1, #ATTN_NORM);
|
||||
// sound (targ, #CHAN_ITEM, "auras/aura1.wav", 1, #ATTN_NORM);
|
||||
self.invincible_sound = time + 1.5;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -81,7 +81,7 @@ void(float aur) AddAura =
|
|||
|
||||
if (!(targ.job & #JOB_CRUSADER))
|
||||
{
|
||||
sound (targ, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
// sound (targ, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
|
||||
local string strung;
|
||||
local float oldaur;
|
||||
|
@ -143,7 +143,7 @@ void() CrusaderAddInvisibility =
|
|||
|
||||
if (!(targ.job & #JOB_CRUSADER))
|
||||
{
|
||||
sound (targ, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
// sound (targ, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
|
||||
sprint(self, #PRINT_HIGH, "You provide ", targ.netname, " with powers of invisibility! They will be invisible for the next 10 seconds!\n");
|
||||
sprint(targ, #PRINT_HIGH, self.netname, " grants you an Aura of Invisibility! You will be fully invisibile for the next 10 seconds!\n");
|
||||
|
@ -185,7 +185,7 @@ void() CrusaderMassHeal =
|
|||
if (Teammate(te.team_no, self.team_no))
|
||||
if (te.health < te.max_health)
|
||||
{
|
||||
sound (te, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
// sound (te, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
|
||||
te.health = te.max_health;
|
||||
if (self != te)
|
||||
|
@ -287,7 +287,7 @@ void() CrusaderDispel =
|
|||
self = te;
|
||||
self = oself;
|
||||
|
||||
sound (te, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
// sound (te, #CHAN_ITEM, "auras/aura3.wav", 1, #ATTN_NORM);
|
||||
|
||||
deathmsg = #DMSG_DISPEL;
|
||||
TF_T_Damage(te, self, self, 25, 0, #TF_TD_OTHER);
|
||||
|
|
2
defs.qc
2
defs.qc
|
@ -948,6 +948,8 @@ float(entity targ, entity inflictor) CanDamage;
|
|||
//.vector old_velocity; // I use neworigin
|
||||
.float reload_laser_cannon;
|
||||
|
||||
// fieldgen fields
|
||||
.entity fieldgen_field;
|
||||
//----------------------------------------------//
|
||||
|
||||
|
||||
|
|
52
field.qc
52
field.qc
|
@ -34,7 +34,7 @@ For field generator entity:
|
|||
|
||||
.has_holo - Holds current status of every field generator, FIELDGEN_XXXX determines
|
||||
.has_sensor - Boolean value, determines if field generator is currently supporting a force field
|
||||
.martyr_enemy - This points to the force field, if none its always 'world'
|
||||
.fieldgen_field - This points to the force field, if none its always 'world'
|
||||
.no_grenades_1 - Controls delay between tries to link (only affects sound currently, it tries to link every frame)
|
||||
.no_grenades_1 - Controls delay for field to go up again after beeing disabled
|
||||
.type_grenades_1 - Controls delay of the WORKING status
|
||||
|
@ -117,13 +117,13 @@ void() Field_think =
|
|||
if (IsValidFieldGen(self.demon_one))
|
||||
{
|
||||
self.demon_one.has_sensor = #FALSE;
|
||||
self.demon_one.martyr_enemy = world;
|
||||
self.demon_one.fieldgen_field = world;
|
||||
}
|
||||
|
||||
if (IsValidFieldGen(self.demon_two))
|
||||
{
|
||||
self.demon_two.has_sensor = #FALSE;
|
||||
self.demon_two.martyr_enemy = world;
|
||||
self.demon_two.fieldgen_field = world;
|
||||
}
|
||||
|
||||
self.demon_one = world;
|
||||
|
@ -510,7 +510,13 @@ void(entity gen1, entity gen2) Create_Field =
|
|||
if (gen1.has_sensor || gen2.has_sensor)
|
||||
return;
|
||||
|
||||
if (gen1.martyr_enemy != world || gen2.martyr_enemy != world) // CHECK
|
||||
/* dprint("gen1:\n");
|
||||
eprint(gen1.fieldgen_field);
|
||||
dprint("gen2:\n");
|
||||
eprint(gen2.fieldgen_field);
|
||||
dprint("done\n"); */
|
||||
|
||||
if (gen1.fieldgen_field != world || gen2.fieldgen_field != world) // CHECK
|
||||
return;
|
||||
|
||||
// already checked b4 on CanLink -> CanIdle
|
||||
|
@ -629,8 +635,8 @@ void(entity gen1, entity gen2) Create_Field =
|
|||
setorigin(tfield, tfield.origin);
|
||||
|
||||
// assign the pointers on the field generators
|
||||
gen1.martyr_enemy = tfield;
|
||||
gen2.martyr_enemy = tfield;
|
||||
gen1.fieldgen_field = tfield;
|
||||
gen2.fieldgen_field = tfield;
|
||||
|
||||
// assign the pointers to generators on ourselves
|
||||
tfield.demon_one = gen1;
|
||||
|
@ -655,24 +661,26 @@ void(entity gen1, entity gen2) Remove_Field =
|
|||
{
|
||||
if (IsValidFieldGen(gen1))
|
||||
{
|
||||
gen1.has_sensor = #FALSE;
|
||||
|
||||
if (IsValidField(gen1.martyr_enemy))
|
||||
if (IsValidField(gen1.fieldgen_field))
|
||||
{
|
||||
dremove(gen1.martyr_enemy);
|
||||
gen1.martyr_enemy = world;
|
||||
}
|
||||
dremove(gen1.fieldgen_field);
|
||||
}
|
||||
gen1.has_sensor = #FALSE;
|
||||
gen1.fieldgen_field = world;
|
||||
if (IsValidFieldGen(gen2))
|
||||
{
|
||||
gen2.has_sensor = #FALSE;
|
||||
gen2.fieldgen_field = world;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsValidFieldGen(gen2))
|
||||
else if (IsValidFieldGen(gen2))
|
||||
{
|
||||
gen2.has_sensor = #FALSE;
|
||||
|
||||
if (IsValidField(gen2.martyr_enemy))
|
||||
if (IsValidField(gen2.fieldgen_field))
|
||||
{
|
||||
dremove(gen2.martyr_enemy);
|
||||
gen2.martyr_enemy = world;
|
||||
}
|
||||
dremove(gen2.fieldgen_field);
|
||||
}
|
||||
gen2.has_sensor = #FALSE;
|
||||
gen2.fieldgen_field = world;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -899,7 +907,7 @@ void() FieldGen_think =
|
|||
self.has_holo = #FIELDGEN_ISENABLED;
|
||||
}
|
||||
|
||||
Field_UpdateSounds(self.martyr_enemy,self); // update force field sounds
|
||||
Field_UpdateSounds(self.fieldgen_field, self); // update force field sounds
|
||||
|
||||
if (!FieldGen_CanIdle(self)) // turn us off if needed
|
||||
self.has_holo = #FIELDGEN_ISOFF;
|
||||
|
@ -985,7 +993,7 @@ void(entity field) Field_Built =
|
|||
field.has_holo = #FIELDGEN_ISIDLE; // we start on IDLE status (searching for other gen to link)
|
||||
field.has_sensor = #FALSE;
|
||||
field.no_grenades_1 = time + 3;
|
||||
field.martyr_enemy = world;
|
||||
field.fieldgen_field = world;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
|
|
4
scout.qc
4
scout.qc
|
@ -758,6 +758,8 @@ entity(entity scanner, float scanrange, float enemies, float friends) T_RadiusSc
|
|||
local entity list_head;
|
||||
local entity list;
|
||||
local float gotatarget;
|
||||
list_head = world;
|
||||
list = world;
|
||||
|
||||
head = findradius(scanner.origin, scanrange+40);
|
||||
|
||||
|
@ -772,7 +774,7 @@ entity(entity scanner, float scanrange, float enemies, float friends) T_RadiusSc
|
|||
{
|
||||
gotatarget = Scanner_Check_Player(scanner, head, enemies, friends);
|
||||
}
|
||||
if ((head.classname == "building_tesla" || head.classname == "building_sentrygun" || head.classname == "building_teleporter") && (head.health > 0)) //CH uses team_no :)
|
||||
else if ((head.classname == "building_tesla" || head.classname == "building_sentrygun" || head.classname == "building_teleporter") && (head.health > 0)) //CH uses team_no :)
|
||||
{
|
||||
if (teamplay)
|
||||
{
|
||||
|
|
30
status.qc
30
status.qc
|
@ -167,7 +167,6 @@ void(entity pl) RefreshStatusBar1 =
|
|||
local string s5, s6, s7;
|
||||
local string val;
|
||||
local float num;
|
||||
local entity te;
|
||||
local entity sent;
|
||||
|
||||
if (pl.StatusBarSize == 0)
|
||||
|
@ -182,15 +181,12 @@ void(entity pl) RefreshStatusBar1 =
|
|||
|
||||
s1 = GetStatusSize(pl);
|
||||
|
||||
te = find(world, classname, "building_sentrygun");
|
||||
while (te)
|
||||
do
|
||||
sent = find(world, classname, "building_sentrygun");
|
||||
while (sent != world && sent.real_owner != self);
|
||||
|
||||
if (sent)
|
||||
{
|
||||
if (te.real_owner == self)
|
||||
{
|
||||
sent = te;
|
||||
}
|
||||
te = find(te, classname, "building_sentrygun");
|
||||
}
|
||||
s2 = SentryDetailsToString(sent);
|
||||
s3 = ftos(floor((sent.health / sent.max_health) * 100));
|
||||
s4 = "% health ";
|
||||
|
@ -216,6 +212,7 @@ void(entity pl) RefreshStatusBar1 =
|
|||
}
|
||||
|
||||
centerprint(pl, s1, s2, s3, s4, s5, s6,s7);
|
||||
}
|
||||
|
||||
//CH determines which screen to show next (its at the end of all RefreshStatusBars)
|
||||
if (self.has_tesla)
|
||||
|
@ -237,7 +234,6 @@ void(entity pl) RefreshStatusBar4 =
|
|||
local string s5, s6, s7;
|
||||
local string val;
|
||||
local float num;
|
||||
local entity te;
|
||||
local entity sent;
|
||||
|
||||
if (pl.StatusBarSize == 0)
|
||||
|
@ -252,15 +248,12 @@ void(entity pl) RefreshStatusBar4 =
|
|||
|
||||
s1 = GetStatusSize(pl);
|
||||
|
||||
te = find(world, classname, "building_tesla");
|
||||
while (te)
|
||||
do
|
||||
sent = find(world, classname, "building_tesla");
|
||||
while (sent != world && sent.real_owner != self);
|
||||
|
||||
if (sent)
|
||||
{
|
||||
if (te.real_owner == self)
|
||||
{
|
||||
sent = te;
|
||||
}
|
||||
te = find(te, classname, "building_tesla");
|
||||
}
|
||||
//- OfN - if (sent.enemy.classname == "monster_demon1" || sent.enemy.classname == "monster_army" || sent.enemy.classname == "monster_shambler" )
|
||||
if (IsMonster(sent.enemy))
|
||||
custom_demon_name(sent.enemy); //CH
|
||||
|
@ -288,6 +281,7 @@ void(entity pl) RefreshStatusBar4 =
|
|||
}
|
||||
|
||||
centerprint(pl, s1, s2, s3, s4, s5, s6,s7);
|
||||
}
|
||||
|
||||
//CH determines which screen to show next (its at the end of all RefreshStatusBars)
|
||||
if (self.scaned != self)
|
||||
|
|
|
@ -143,7 +143,9 @@ void() TeamFortress_HelpMap =
|
|||
void() AliasTimer = {
|
||||
local entity oself;
|
||||
local float myheat;
|
||||
myheat = self.heat = self.heat + 1;
|
||||
|
||||
self.heat = self.heat + 1;
|
||||
myheat = self.heat;
|
||||
if (self.heat > 5) {
|
||||
self.think = SUB_Remove;
|
||||
self.nextthink = time + 0.1;
|
||||
|
|
|
@ -5054,7 +5054,7 @@ void() SuperDamageSound =
|
|||
if (self.super_sound < time)
|
||||
{
|
||||
self.super_sound = time + 1;
|
||||
sound (self, #CHAN_BODY, "auras/aura2.wav", 1, #ATTN_NORM);
|
||||
// sound (self, #CHAN_BODY, "auras/aura2.wav", 1, #ATTN_NORM);
|
||||
}
|
||||
}
|
||||
else if (self.aura == #AURA_HASTE)
|
||||
|
@ -5062,7 +5062,7 @@ void() SuperDamageSound =
|
|||
if (self.super_sound < time)
|
||||
{
|
||||
self.super_sound = time + 1;
|
||||
sound (self, #CHAN_BODY, "auras/aura4.wav", 1, #ATTN_NORM);
|
||||
// sound (self, #CHAN_BODY, "auras/aura4.wav", 1, #ATTN_NORM);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
8
world.qc
8
world.qc
|
@ -453,10 +453,10 @@ void() worldspawn =
|
|||
precache_sound2("effects/bodyhit2.wav");
|
||||
|
||||
//- OfN - Aura sounds
|
||||
precache_sound2("auras/aura1.wav");
|
||||
precache_sound2("auras/aura2.wav");
|
||||
precache_sound2("auras/aura3.wav");
|
||||
precache_sound2("auras/aura4.wav");
|
||||
// precache_sound2("auras/aura1.wav");
|
||||
// precache_sound2("auras/aura2.wav");
|
||||
// precache_sound2("auras/aura3.wav");
|
||||
// precache_sound2("auras/aura4.wav");
|
||||
|
||||
//precache_sound2("weapons/pinpull.wav");
|
||||
//precache_sound2("weapons/throw.wav");
|
||||
|
|
Loading…
Reference in a new issue