From: Mario Date: Mon, 2 Jan 2017 08:01:38 +0000 (+0000) Subject: Merge branch 'martin-t/info' into 'master' X-Git-Tag: xonotic-v0.8.2~332 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=a4d5506edce8f5c53243f5312da3ae10677a2edd;hp=75a0ea065a26dd33fa2905749e92e3a64e8aa729 Merge branch 'martin-t/info' into 'master' Remove "client version and server version are compatible" message See merge request !401 --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 9d89679e3b..cacc1e4f51 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -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? diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index 5a279561d3..746270877b 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -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); } diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index 58214bf390..1af08bc12c 100644 --- a/qcsrc/common/weapons/weapon/crylink.qc +++ b/qcsrc/common/weapons/weapon/crylink.qc @@ -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"); diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 59f0c8029b..f23e6021dd 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -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 {