diff --git a/defs.qh b/defs.qh index ba2816c..5d1aeed 100644 --- a/defs.qh +++ b/defs.qh @@ -1138,7 +1138,7 @@ float (entity e) EF_GlowColor; #define PC_ENGINEER_GRENADE_TYPE_1 GR_TYPE_NORMAL #define PC_ENGINEER_GRENADE_TYPE_2 GR_TYPE_EMP #define PC_ENGINEER_GRENADE_INIT_1 4 -#define PC_ENGINEER_GRENADE_INIT_2 4 +#define PC_ENGINEER_GRENADE_INIT_2 3 #define PC_ENGINEER_TF_ITEMS NIT_TESLA | NIT_SECURITY_CAMERA | NIT_TELEPORTER #define PC_ENGINEER_CUTFITEMS CUTF_SENTRYGUN | CUTF_DISPENSER | CUTF_SENSOR | CUTF_FIELDGEN #define PC_ENGINEER_JOB JOB_HACKER //JOB_JUDOKA diff --git a/engineer.qc b/engineer.qc index 3f207d5..241f62a 100644 --- a/engineer.qc +++ b/engineer.qc @@ -240,7 +240,7 @@ void() EMPGrenadeExplode = //CH Slice gave idea of an emp gren getting rated based on blast so i added.. total_exp = 0; local float range = 300; - local float dmg = 0.8; + local float dmg = 0.3; local float numcells = 0; local float numrockets = 0; @@ -272,7 +272,7 @@ void() EMPGrenadeExplode = while (te) { dist = vlen(self.origin - te.origin); - mult = 0.85 - (0.65 * dist / range) + (0.15 * random()); + mult = 0.90 - (0.75 * dist / range) + (0.10 * random()); mult *= dmg; if (IsBuilding(te)) @@ -414,11 +414,11 @@ void() EMPGrenadeExplode = //WK Make players not explode radially! GR why not? if (te.touch != BackpackTouch) { - T_RadiusDamage(te, self.owner, expsize * 0.4, te); + T_RadiusDamage(te, self.owner, expsize, te); deathmsg = DMSG_GREN_EMP; - TF_T_Damage (te, te, self.owner, expsize / 3, 0, TF_TD_IGNOREARMOUR); - TF_T_Damage (te, te, self.owner, 2 * expsize / 3, 0, TF_TD_EXPLOSION); + TF_T_Damage (te, te, self.owner, 2 * expsize / 3, 0, TF_TD_IGNOREARMOUR); + TF_T_Damage (te, te, self.owner, expsize / 3, 0, TF_TD_EXPLOSION); // Remove ammo te.ammo_cells -= numcells; diff --git a/tfortmap.qc b/tfortmap.qc index 0d22e4f..c35d911 100644 --- a/tfortmap.qc +++ b/tfortmap.qc @@ -3040,6 +3040,10 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer = DelayReturn.enemy = Item; DelayReturn.think = ReturnItem; DelayReturn.nextthink = time + 0.5; + + Item.owner = NIL; + TeamFortress_SetSpeed (AP); + AP.effects |= EF_GlowColor (AP); /* Item.solid = SOLID_TRIGGER; Item.touch = item_tfgoal_touch; @@ -3052,6 +3056,7 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer = else if (Item.goal_activation & TFGI_DROP) { tfgoalitem_drop(Item); + AP.effects |= EF_GlowColor(AP); } else { @@ -3062,9 +3067,6 @@ void(entity Item, entity AP, float method) tfgoalitem_RemoveFromPlayer = AP.effects |= EF_GlowColor(AP); return; } - Item.owner = NIL; - TeamFortress_SetSpeed(AP); - AP.effects |= EF_GlowColor(AP); return; } @@ -3216,12 +3218,10 @@ void(entity Item) tfgoalitem_drop = Item.movetype = MOVETYPE_TOSS; //CH set solid state -//GR this can cause players to be trapped inside their items when they dropitems, do it later -#if 0 + if (Item.goal_activation & TFGI_GOAL_IS_SOLID) Item.solid = SOLID_BBOX; else -#endif Item.solid = SOLID_TRIGGER; setorigin(Item, Item.origin); @@ -3244,7 +3244,7 @@ void(entity Item) tfgoalitem_drop = makevectors(Item.owner.v_angle); Item.velocity = v_forward * 400 + v_up * 200; - Item.nextthink = time + 0.5; //CH wait a sec then make it pickupable GR half a sec + Item.nextthink = time + 0.75; //CH wait a sec then make it pickupable GR .75 to match tf 2.9 Item.think = tfgoalitem_settouchandthink; } else @@ -3255,28 +3255,26 @@ void(entity Item) tfgoalitem_drop = Item.goal_state = TFGS_INACTIVE; Item.touch = item_tfgoal_touch; - if (Item.goal_activation & TFGI_GOAL_IS_SOLID) - { - Item.solid = SOLID_BBOX; - setorigin(Item, Item.origin); - } + Item.owner = NIL; } }; //CH brings the item online after 1 sec void() tfgoalitem_settouchandthink = { - self.nextthink = time + 4.0; // give it five seconds + self.nextthink = time + 4.25; // give it five seconds self.think = tfgoalitem_dropthink; // and then find where it ended up self.goal_state = TFGS_INACTIVE; self.touch = item_tfgoal_touch; - if (self.goal_activation & TFGI_GOAL_IS_SOLID) - { - self.solid = SOLID_BBOX; - setorigin(self, self.origin); - } + local entity o = self.owner; + + self.owner = NIL; + + TeamFortress_SetSpeed (o); + o.effects &= ~EF_ANYGLOW; + o.effects |= EF_GlowColor (o); }; //=========================================================================