]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc
Add Team Keepaway, a teamplay variant of Keepaway where points are awarded for each...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / keepaway / sv_keepaway.qc
index 4ad694de826f374e42bfa59eea7861b4b096a5a9..d42703fb297c4a05b0fb8a1d7f6fa0ded7e40bfe 100644 (file)
@@ -247,13 +247,13 @@ void ka_SpawnBall()
 {
        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
        e.damageforcescale = autocvar_g_keepawayball_damageforcescale;
        e.takedamage = DAMAGE_YES;
        e.event_damage = ka_DamageEvent;
        e.damagedbycontents = true;
        IL_PUSH(g_damagedbycontents, e);
-       e.solid = SOLID_TRIGGER;
        set_movetype(e, MOVETYPE_BOUNCE);
        e.glow_color = autocvar_g_keepawayball_trail_color;
        e.glow_trail = true;
@@ -431,7 +431,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);
@@ -447,13 +447,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
                {