Merge branch 'martin-t/info' into 'master'
authorMario <zacjardine@y7mail.com>
Mon, 2 Jan 2017 08:01:38 +0000 (08:01 +0000)
committerMario <zacjardine@y7mail.com>
Mon, 2 Jan 2017 08:01:38 +0000 (08:01 +0000)
Remove "client version and server version are compatible" message

See merge request !401

qcsrc/common/t_items.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/server/player.qc

index 9d89679e3be9f88817ea8abd9883774c36eca22a..cacc1e4f511e87ba71f3e91dd83889c0194866af 100644 (file)
@@ -1058,6 +1058,12 @@ void Item_Damage(entity this, entity inflictor, entity attacker, float damage, i
                RemoveItem(this);
 }
 
+void item_use(entity this, entity actor, entity trigger)
+{
+       // use the touch function to handle collection
+       gettouch(this)(this, actor);
+}
+
 void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter)
 {
        string itemname = def.m_name;
@@ -1179,6 +1185,9 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
                }
                */
 
+               if(this.targetname != "" && (this.spawnflags & 16))
+                       this.use = item_use;
+
                if(autocvar_spawn_debug >= 2)
                {
             // why not flags & fl_item?
index 5a279561d374c5c6b0d975e3a4105b5e2f322787..746270877b5018930d3f6e1d5c32abe05553f62c 100644 (file)
@@ -222,7 +222,7 @@ bool jumppad_push(entity this, entity targ)
        }
 
        if(this.enemy.target)
-               SUB_UseTargets(this.enemy, targ, targ); // TODO: do we need targ as trigger too?
+               SUB_UseTargets(this.enemy, targ, this);
 
        if (targ.flags & FL_PROJECTILE)
        {
@@ -418,6 +418,9 @@ bool target_push_send(entity this, entity to, float sf)
 
 void target_push_use(entity this, entity actor, entity trigger)
 {
+       if(trigger.classname == "trigger_push" || trigger == this)
+               return; // WTF, why is this a thing
+
        jumppad_push(this, actor);
 }
 
index 58214bf390feed3d2f41e1ec5ec24c847b02c10f..1af08bc12c7ded2e48b5111d19b7b66291bd7f15 100644 (file)
@@ -3,7 +3,7 @@
 CLASS(Crylink, Weapon)
 /* ammotype  */ ATTRIB(Crylink, ammo_field, .int, ammo_cells);
 /* impulse   */ ATTRIB(Crylink, impulse, int, 6);
-/* flags     */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
+/* flags     */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH | WEP_FLAG_CANCLIMB);
 /* rating    */ ATTRIB(Crylink, bot_pickupbasevalue, float, BOT_PICKUP_RATING_MID);
 /* color     */ ATTRIB(Crylink, wpcolor, vector, '1 0.5 1');
 /* modelname */ ATTRIB(Crylink, mdl, string, "crylink");
index 59f0c8029b7ab89f9a01458687631a5951e07c64..f23e6021dda913622990607875680f802152d608 100644 (file)
@@ -435,7 +435,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                                        }
 
                                        if(sound_allowed(MSG_BROADCAST, attacker))
-                                       if((this.health < 2 * WEP_CVAR_PRI(blaster, damage) * autocvar_g_balance_selfdamagepercent + 1) || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || attacker != this) // WEAPONTODO: create separate limit for pain notification with laser
+                                       if(this.health < 25 || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || take > 20 || attacker != this)
                                        if(this.health > 1)
                                        // exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
                                        {