Skip to content

Commit

Permalink
Merge remote-tracking branch 'medo/B2.3' into 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
wareya committed Jul 5, 2011
2 parents 1532221 + b3a63a9 commit 03b0cce
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
18 changes: 10 additions & 8 deletions Source/gg2/Objects/InGameElements/Character.events/Begin Step.xml
Expand Up @@ -87,20 +87,20 @@ if ((pressedKeys & $08) && canCloak && ((cloakAlpha <= 0.

switch(moveStatus) // moveStatus is reset in collision with obstacles (including doors if they reject you)
{
case 1: //If I am rocketing myself
case 1: //If I am rocketing/mining myself
controlFactor = 0.65;
frictionFactor = 1;
break;
case 2: //If I am rocketing an enemy
case 2: //If I am rocketing/mining an enemy
controlFactor = 0.45;
frictionFactor = 1.05;
break;
case 3: //Airblast
controlFactor = 0.3;
frictionFactor = 1;
controlFactor = 0.35;
frictionFactor = 1.05;
break;
case 4: //If I am rocketing a teamate/mining someone (more control than 2)
controlFactor = 0.85;
case 4: //If I am rocketing/mining a teamate
controlFactor = baseControl;
frictionFactor = 1;
break;
default:
Expand Down Expand Up @@ -152,9 +152,11 @@ if(!taunting && !omnomnomnom)
if((keyState|pressedKeys) & $20 and hspeed < runPower * controlFactor / (baseFriction - 1))
hspeed += runPower*controlFactor;
}
if(abs(hspeed) > abs(1 * baseControl / (baseFriction - 1))*2)// divide friction as normal if going way too fast, based on normal max speed
//divide friction as normal if going way too fast, or controlling motion, based on normal max speed
if(abs(hspeed) > abs(baseControl / (baseFriction - 1) * 2) or
((keyState|pressedKeys) & $60 and !(abs(hspeed) > abs(baseControl / (baseFriction - 1)))) )
hspeed /= baseFriction;
else // otherwise divide by the moveStatus's friction
else //otherwise divide by the moveStatus's friction
hspeed /= frictionFactor;


Expand Down
1 change: 1 addition & 0 deletions Source/gg2/Objects/Projectiles/Mine.events/Create.xml
Expand Up @@ -22,6 +22,7 @@
exploded = false;
bubbled = false;
reflector = noone;
knockback = 10;
}
</argument>
</arguments>
Expand Down
9 changes: 7 additions & 2 deletions Source/gg2/Objects/Projectiles/Mine.events/User Event 2.xml
Expand Up @@ -28,7 +28,7 @@
var rdir, vectorfactor;
rdir = point_direction(other.x,other.y,x,y);
vectorfactor = point_distance(0, 0, power(sin(degtorad(rdir)), 2), power(cos(degtorad(rdir)), 2));
motion_add(rdir, min(15, 10-10*(distance_to_object(other)/other.blastRadius)) * vectorfactor);
motion_add(rdir, min(15, other.knockback-other.knockback*(distance_to_object(other)/other.blastRadius)) * vectorfactor);
if(other.team != team or id==other.ownerPlayer.object) &amp;&amp; !ubered and hp &gt; 0
{
hp -= other.explosionDamage*(1-(distance_to_object(other)/other.blastRadius));
Expand Down Expand Up @@ -62,11 +62,16 @@
blood.direction = point_direction(other.x,other.y,x,y)-180;
}
}
if (id==other.ownerPlayer.object and other.team == team)
if (id==other.ownerPlayer.object)
{
moveStatus = 1;
vspeed*=0.8;
}
else if (other.team == team)
{
moveStatus = 2;
vspeed*=0.8;
}
else
{
moveStatus = 4;
Expand Down

0 comments on commit 03b0cce

Please sign in to comment.