-
Notifications
You must be signed in to change notification settings - Fork 0
/
2745.gsc
135 lines (103 loc) · 3 KB
/
2745.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// IW7 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
_id_17CE( var_0 )
{
var_1 = self._id_8CFC;
if ( !isdefined( self.struct ) )
{
var_1 = spawnstruct( self._id_8CFC );
var_1.player = self;
var_1._id_9118 = 0;
self._id_8CFC = var_1;
var_1._id_9118 += var_0;
self notify( "heavyArmor_added" );
}
else
var_1._id_9118 += var_0;
}
_id_111AB( var_0 )
{
var_1 = self._id_8CFC;
if ( scripts\mp\utility\game::istrue( var_1._id_9344 ) )
return;
if ( var_1._id_9118 > 0 )
{
var_1._id_9118 = max( 0, var_1._id_9118 - var_0 );
scripts\mp\missions::_id_D991( "ch_heavy_armor_absorb", var_0 );
if ( var_1._id_9118 <= 0 )
thread _id_8CFD();
}
}
_id_E12B()
{
self notify( "heavyArmor_removed" );
self._id_8CFC = undefined;
}
_id_8D07( var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, var_9, var_10 )
{
if ( var_2 <= 0 && var_3 <= 0 )
return [ 0, var_2, var_3 ];
if ( var_4 == "MOD_SUICIDE" )
return [ 0, var_2, var_3 ];
if ( isdefined( var_1 ) && ( var_1.classname == "trigger_hurt" || var_1.classname == "worldspawn" ) )
return [ 0, var_2, var_3 ];
if ( !var_0 _id_8BFA() )
return [ 0, var_2, var_3 ];
if ( scripts\mp\utility\game::_id_9D6E( var_5 ) )
return [ 0, var_2, var_3 ];
if ( var_0 _id_8BFB() )
return [ 1, 1, 0 ];
var_11 = var_0 _id_7EF8();
var_12 = _id_8D01( var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, var_9, var_10 );
var_13 = var_2 * var_12;
var_14 = var_3 * var_12;
var_15 = var_13 + var_14;
if ( !var_10 )
var_0 _id_111AB( var_15 );
if ( var_0 _id_8BFB() )
return [ var_11, 1, 0 ];
return [ var_2 + var_3, 1, 0 ];
}
_id_7EF8()
{
if ( !_id_8BFA() )
return 0;
return self._id_8CFC._id_9118;
}
_id_8BFA()
{
return isdefined( self._id_8CFC ) && ( self._id_8CFC._id_9118 > 0 || scripts\mp\utility\game::istrue( self._id_8CFC._id_9B30 ) );
}
_id_8BFB()
{
return isdefined( self._id_8CFC ) && scripts\mp\utility\game::istrue( self._id_8CFC._id_9B30 );
}
_id_8CFD()
{
self endon( "disconnect" );
self endon( "heavyArmor_removed" );
if ( !scripts\mp\utility\game::_id_9D46() )
self._id_8CFC._id_9B30 = 1;
self notify( "heavyArmor_broken" );
waittillframeend;
thread _id_E12B();
}
_id_8D01( var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, var_9, var_10 )
{
var_11 = [];
if ( scripts\mp\utility\game::_id_9F8D( var_4 ) )
var_11[var_11.size] = 1.33;
if ( isexplosivedamagemod( var_4 ) )
var_11[var_11.size] = 1.5;
if ( var_4 == "MOD_MELEE" )
var_11[var_11.size] = 1.5;
if ( scripts\mp\utility\game::isheadshot( var_5, var_8, var_4, var_1 ) )
var_11[var_11.size] = 1.5;
var_12 = 1;
foreach ( var_14 in var_11 )
{
if ( var_14 > var_12 )
var_14 = var_12;
}
return var_12;
}