-
Notifications
You must be signed in to change notification settings - Fork 0
/
2710.gsc
78 lines (68 loc) · 1.94 KB
/
2710.gsc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// IW7 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
setupminimap( var_0 )
{
var_1 = getdvarfloat( "scr_RequiredMapAspectratio", 1 );
var_2 = getentarray( "minimap_corner", "targetname" );
if ( var_2.size != 2 )
return;
var_3 = ( var_2[0].origin[0], var_2[0].origin[1], 0 );
var_4 = ( var_2[1].origin[0], var_2[1].origin[1], 0 );
var_5 = var_4 - var_3;
var_6 = ( cos( getnorthyaw() ), sin( getnorthyaw() ), 0 );
var_7 = ( 0 - var_6[1], var_6[0], 0 );
if ( vectordot( var_5, var_7 ) > 0 )
{
if ( vectordot( var_5, var_6 ) > 0 )
{
var_8 = var_4;
var_9 = var_3;
}
else
{
var_10 = _id_13193( var_6, vectordot( var_5, var_6 ) );
var_8 = var_4 - var_10;
var_9 = var_3 + var_10;
}
}
else if ( vectordot( var_5, var_6 ) > 0 )
{
var_10 = _id_13193( var_6, vectordot( var_5, var_6 ) );
var_8 = var_3 + var_10;
var_9 = var_4 - var_10;
}
else
{
var_8 = var_3;
var_9 = var_4;
}
if ( getdvar( "mapname" ) == "mp_boneyard_ns" )
{
var_9 -= ( 220, 220, 0 );
var_8 += ( 220, 220, 0 );
}
if ( var_1 > 0 )
{
var_11 = vectordot( var_8 - var_9, var_6 );
var_12 = vectordot( var_8 - var_9, var_7 );
var_13 = var_12 / var_11;
if ( var_13 < var_1 )
{
var_14 = var_1 / var_13;
var_15 = _id_13193( var_7, var_12 * ( var_14 - 1 ) * 0.5 );
}
else
{
var_14 = var_13 / var_1;
var_15 = _id_13193( var_6, var_11 * ( var_14 - 1 ) * 0.5 );
}
var_8 += var_15;
var_9 -= var_15;
}
level._id_B339 = vectordot( var_8 - var_9, var_6 );
setminimap( var_0, var_8[0], var_8[1], var_9[0], var_9[1] );
}
_id_13193( var_0, var_1 )
{
return ( var_0[0] * var_1, var_0[1] * var_1, var_0[2] * var_1 );
}