@@ -18,7 +18,7 @@ public class ActivityGhosts : Script
18
18
{
19
19
private List < Ghost > ghosts ;
20
20
private Blip start ;
21
- private System . DateTime lastTime ;
21
+ private int lastTime ;
22
22
private Keys menuKey ;
23
23
public static PointF initialGPSPoint ;
24
24
public static int opacity ;
@@ -27,7 +27,7 @@ public class ActivityGhosts : Script
27
27
public ActivityGhosts ( )
28
28
{
29
29
ghosts = new List < Ghost > ( ) ;
30
- lastTime = System . DateTime . UtcNow ;
30
+ lastTime = Environment . TickCount ;
31
31
LoadSettings ( ) ;
32
32
CreateMenu ( ) ;
33
33
Tick += OnTick ;
@@ -36,11 +36,11 @@ public ActivityGhosts()
36
36
37
37
private void OnTick ( object sender , EventArgs e )
38
38
{
39
- if ( System . DateTime . UtcNow >= lastTime . AddSeconds ( 1 ) )
39
+ if ( Environment . TickCount >= lastTime + 1000 )
40
40
{
41
41
foreach ( Ghost g in ghosts )
42
42
g . Update ( ) ;
43
- lastTime = System . DateTime . UtcNow ;
43
+ lastTime = Environment . TickCount ;
44
44
}
45
45
46
46
if ( showDate )
@@ -73,7 +73,7 @@ private void RegroupGhosts()
73
73
{
74
74
foreach ( Ghost g in ghosts )
75
75
g . Regroup ( new PointF ( Game . Player . Character . Position . X , Game . Player . Character . Position . Y ) ) ;
76
- lastTime = System . DateTime . UtcNow ;
76
+ lastTime = Environment . TickCount ;
77
77
}
78
78
79
79
private void LoadGhosts ( )
0 commit comments