Skip to content

Commit 99fec90

Browse files
committed
Accelerate animation after initial display
1 parent 37a0318 commit 99fec90

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

DmgHUD.uc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function PostRender(Canvas Canvas)
2424

2525
final function AddNumberMsg( int Amount, vector Pos )
2626
{
27-
local int i;
2827
local vector velocity;
28+
local int i;
2929

3030
i = Numbers.Length;
3131
while( i>18 ) // don't overflow this that much...
@@ -35,11 +35,12 @@ final function AddNumberMsg( int Amount, vector Pos )
3535
Numbers.Remove(0,1);
3636
i = Numbers.Length;
3737
}
38+
3839
velocity = vect(0, 0, 0);
3940
velocity.X = FRand() * 400.f - 200.f;
4041
velocity.Y = FRand() * 400.f - 200.f;
4142
velocity.Z = FRand() * 200.f + 150.f;
42-
43+
4344
Numbers.Length = i+1;
4445
Numbers[i].Vel = velocity;
4546
Numbers[i].Amount = Amount;
@@ -72,14 +73,12 @@ final function DrawNumberMsg( Canvas Canvas )
7273

7374
if( T>Duration )
7475
{
75-
`Log("Duration exceeded: " $ string(i) $ " - " $ string(T))
7676
Numbers.remove(i, 1);
7777
continue;
7878
}
79+
7980
AnimPercent = T/Duration;
80-
Numbers[i].Pos += Numbers[i].Vel * Dt;
8181
V = Numbers[i].Pos;
82-
Numbers[i].Vel.Z -= 700.f * Dt;
8382

8483
ThisDot = FMin((PLCameraDir Dot V) - CameraDot, 2000.f) / 2000.f;
8584

@@ -114,6 +113,9 @@ final function DrawNumberMsg( Canvas Canvas )
114113
Canvas.DrawText(S,,ThisDot,ThisDot);
115114
}
116115
}
116+
117+
Numbers[i].Pos += Numbers[i].Vel * Dt;
118+
Numbers[i].Vel.Z -= 700.f * Dt;
117119
}
118120
}
119121

DmgMut.uc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ function NetDamage(int OriginalDamage, out int Damage, Pawn Injured, Controller
9696
LastHitPawn = Injured;
9797
LastHitHP = Injured.Health;
9898
LastDamagePosition = HitLocation;
99+
`Log("Hit: " $ string(HitLocation));
99100
LastDamageInstigator = PlayerController(InstigatedBy);
100101
SetTimer(0.001,false,'CheckDamageDone');
101102
}

0 commit comments

Comments
 (0)