-
Notifications
You must be signed in to change notification settings - Fork 0
/
2726.gsc
319 lines (260 loc) · 7.21 KB
/
2726.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
// IW7 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
init()
{
if ( isdefined( level._id_9801 ) )
return;
level._id_9801 = 1;
if ( level._id_BDCC )
{
foreach ( var_1 in level._id_115DA )
{
var_2 = "entity_headicon_" + var_1;
game[var_2] = scripts\mp\teams::_id_BD71( var_1 );
precacheshader( game[var_2] );
}
}
else
{
game["entity_headicon_allies"] = scripts\mp\teams::_id_81B0( "allies" );
game["entity_headicon_axis"] = scripts\mp\teams::_id_81B0( "axis" );
precacheshader( game["entity_headicon_allies"] );
precacheshader( game["entity_headicon_axis"] );
}
}
_id_F73D( var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, var_9, var_10 )
{
if ( scripts\mp\utility\game::_id_9E0E( var_0 ) && !isplayer( var_0 ) )
return;
if ( !isdefined( self._id_6647 ) )
self._id_6647 = [];
if ( !isdefined( var_5 ) )
var_5 = 1;
if ( !isdefined( var_6 ) )
var_6 = 0.05;
if ( !isdefined( var_7 ) )
var_7 = 1;
if ( !isdefined( var_8 ) )
var_8 = 1;
if ( !isdefined( var_9 ) )
var_9 = 0;
if ( !isdefined( var_10 ) )
var_10 = 1;
if ( !isplayer( var_0 ) && var_0 == "none" )
{
foreach ( var_13, var_12 in self._id_6647 )
{
if ( isdefined( var_12 ) )
var_12 destroy();
self._id_6647[var_13] = undefined;
}
}
else
{
if ( isplayer( var_0 ) )
{
if ( isdefined( self._id_6647[var_0.guid] ) )
{
self._id_6647[var_0.guid] destroy();
self._id_6647[var_0.guid] = undefined;
}
if ( var_1 == "" )
return;
if ( isdefined( var_0.team ) )
{
if ( isdefined( self._id_6647[var_0.team] ) )
{
self._id_6647[var_0.team] destroy();
self._id_6647[var_0.team] = undefined;
}
}
var_12 = newclienthudelem( var_0 );
self._id_6647[var_0.guid] = var_12;
}
else
{
if ( isdefined( self._id_6647[var_0] ) )
{
self._id_6647[var_0] destroy();
self._id_6647[var_0] = undefined;
}
if ( var_1 == "" )
return;
foreach ( var_13, var_15 in self._id_6647 )
{
if ( var_13 == "axis" || var_13 == "allies" )
continue;
var_16 = scripts\mp\utility\game::_id_8071( var_13 );
if ( var_16.team == var_0 )
{
self._id_6647[var_13] destroy();
self._id_6647[var_13] = undefined;
}
}
var_12 = newteamhudelem( var_0 );
self._id_6647[var_0] = var_12;
}
if ( !isdefined( var_3 ) || !isdefined( var_4 ) )
{
var_3 = 10;
var_4 = 10;
}
var_12._id_0049 = var_5;
var_12.x = self.origin[0] + var_2[0];
var_12.y = self.origin[1] + var_2[1];
var_12.z = self.origin[2] + var_2[2];
var_12.alpha = 0.85;
var_12 setshader( var_1, var_3, var_4 );
var_12 setwaypoint( var_7, var_8, var_9, var_10 );
var_12 thread _id_A57C( self, var_2, var_6 );
thread _id_531F();
if ( isplayer( var_0 ) )
var_12 thread _id_5320( var_0 );
if ( isplayer( self ) )
var_12 thread _id_5320( self );
}
}
_id_5320( var_0 )
{
self endon( "death" );
var_0 waittill( "disconnect" );
self destroy();
}
_id_531F()
{
self notify( "destroyIconsOnDeath" );
self endon( "destroyIconsOnDeath" );
self waittill( "death" );
if ( !isdefined( self._id_6647 ) )
return;
foreach ( var_2, var_1 in self._id_6647 )
{
if ( !isdefined( var_1 ) )
continue;
var_1 destroy();
}
}
_id_A57C( var_0, var_1, var_2 )
{
self endon( "death" );
var_0 endon( "death" );
var_0 endon( "disconnect" );
var_3 = isdefined( var_0.classname ) && !_id_9ED0( var_0 );
if ( var_3 )
self _meth_81E5( var_0, var_1 );
for (;;)
{
if ( !isdefined( var_0 ) )
return;
if ( !var_3 )
{
var_4 = var_0.origin;
self.x = var_4[0] + var_1[0];
self.y = var_4[1] + var_1[1];
self.z = var_4[2] + var_1[2];
}
if ( var_2 > 0.05 )
{
self.alpha = 0.85;
self fadeovertime( var_2 );
self.alpha = 0;
}
wait( var_2 );
}
}
_id_9ED0( var_0 )
{
return isdefined( var_0._id_0336 ) && var_0._id_0336 == "care_package";
}
_id_F73E( var_0, var_1, var_2 )
{
self endon( "death" );
var_0 endon( "disconnect" );
wait( var_2 );
if ( level.teambased )
_id_F877( var_0.team, var_1 );
else
_id_F7F2( var_0, var_1 );
}
_id_F877( var_0, var_1 )
{
if ( !level.teambased )
return;
if ( !isdefined( self._id_6648 ) )
{
self._id_6648 = "none";
self._id_6644 = undefined;
}
var_2 = game["entity_headicon_" + var_0];
self._id_6648 = var_0;
if ( isdefined( var_1 ) )
self._id_6645 = var_1;
else
self._id_6645 = ( 0, 0, 0 );
self notify( "kill_entity_headicon_thread" );
if ( var_0 == "none" )
{
if ( isdefined( self._id_6644 ) )
self._id_6644 destroy();
return;
}
var_3 = newteamhudelem( var_0 );
var_3._id_0049 = 1;
var_3.x = self.origin[0] + self._id_6645[0];
var_3.y = self.origin[1] + self._id_6645[1];
var_3.z = self.origin[2] + self._id_6645[2];
var_3.origin = ( var_3.x, var_3.y, var_3.z );
var_3.alpha = 1.0;
var_3 setshader( var_2, 10, 10 );
var_3 setwaypoint( 0, 0, 0, 1 );
self._id_6644 = var_3;
thread _id_A578();
thread _id_531E();
}
_id_F7F2( var_0, var_1 )
{
if ( level.teambased )
return;
if ( !isdefined( self._id_6648 ) )
{
self._id_6648 = "none";
self._id_6644 = undefined;
}
self notify( "kill_entity_headicon_thread" );
if ( !isdefined( var_0 ) )
{
if ( isdefined( self._id_6644 ) )
self._id_6644 destroy();
return;
}
var_2 = var_0.team;
self._id_6648 = var_2;
if ( isdefined( var_1 ) )
self._id_6645 = var_1;
else
self._id_6645 = ( 0, 0, 0 );
var_3 = game["entity_headicon_" + var_2];
var_4 = newclienthudelem( var_0 );
var_4._id_0049 = 1;
var_4.x = self.origin[0] + self._id_6645[0];
var_4.y = self.origin[1] + self._id_6645[1];
var_4.z = self.origin[2] + self._id_6645[2];
var_4.alpha = 0.8;
var_4 setshader( var_3, 10, 10 );
var_4 setwaypoint( 0, 0, 0, 1 );
self._id_6644 = var_4;
thread _id_A578();
thread _id_531E();
}
_id_A578()
{
self._id_6644 _meth_81E5( self, self._id_6645 );
}
_id_531E()
{
self endon( "kill_entity_headicon_thread" );
self waittill( "death" );
if ( !isdefined( self._id_6644 ) )
return;
self._id_6644 destroy();
}