X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fkeepaway%2Fsv_keepaway.qc;h=4ba23b197955ca4efdecb6d9ad06a23a178486d1;hb=2e30632598aee1914eddcabf35a7774be816b069;hp=29025f7cb7d1da6b09183c0f438696c14438dfa0;hpb=90b21340c6f5678a7b0ea3dda116ec7f4fa4352e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc index 29025f7cb..4ba23b197 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc @@ -198,6 +198,7 @@ void ka_DropEvent(entity player) // runs any time that a player is supposed to l IL_PUSH(g_damagedbycontents, ball); ball.effects &= ~EF_NODRAW; setorigin(ball, player.origin + '0 0 10'); + nudgeoutofsolid(ball); // a ball has a horizontally bigger bbox than a player ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom(); ball.owner = NULL; navigation_dynamicgoal_set(ball, player); @@ -240,7 +241,10 @@ void ka_SpawnBalls() entity e = new(keepawayball); setmodel(e, MDL_KA_BALL); e.solid = SOLID_TRIGGER; // before setsize to ensure area grid linking - setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off + // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off + // bones_was_here: that was WITH sv_legacy_bbox_expand 1 and FL_ITEM (mins -= '15 15 1'; maxs += '15 15 1') + // it's round so should have a symmetrical bbox, same height as pickup items so it can't be jumped over in any physics + setsize(e, '-24 -24 -24', '24 24 24'); e.damageforcescale = autocvar_g_keepawayball_damageforcescale; e.takedamage = DAMAGE_YES; e.event_damage = ka_DamageEvent; @@ -410,7 +414,7 @@ MUTATOR_HOOKFUNCTION(ka, PlayerUseKey) } } -MUTATOR_HOOKFUNCTION(ka, Damage_Calculate) // for changing damage and force values that are applied to players in damage.qc +MUTATOR_HOOKFUNCTION(ka, Damage_Calculate) // for changing damage and force values that are applied to players { entity frag_attacker = M_ARGV(1, entity); entity frag_target = M_ARGV(2, entity); @@ -426,13 +430,13 @@ MUTATOR_HOOKFUNCTION(ka, Damage_Calculate) // for changing damage and force valu M_ARGV(4, float) *= autocvar_g_keepaway_ballcarrier_selfdamage; M_ARGV(6, vector) *= autocvar_g_keepaway_ballcarrier_selfforce; } - else // damage done to noncarriers + else // damage done to other ballcarriers { M_ARGV(4, float) *= autocvar_g_keepaway_ballcarrier_damage; M_ARGV(6, vector) *= autocvar_g_keepaway_ballcarrier_force; } } - else // if the target is a noncarrier + else // if the attacker is a noncarrier { if(frag_target == frag_attacker) // damage done to yourself {