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
209 {
210 return;
211 }
214 int width =
ent.width;
215 int height =
ent.height;
218 {
219 num = (int)((Player)
ent).gravDir;
220 }
222 {
224 {
225 continue;
226 }
227 for (
int j = 0;
j < 2;
j++)
228 {
232 {
233 continue;
234 }
236 float num2 =
ent.Hitbox.Distance(projectile.Center);
240 Vector2
vector2 = Vector2.UnitX * 16
f;
242 {
243 continue;
244 }
247 {
248 continue;
249 }
252 {
253 continue;
254 }
257 {
258 continue;
259 }
262 {
264 }
265 if (
ent.velocity == Vector2.Zero)
266 {
267 ent.velocity = (projectile.ai[0] - (float)
Math.PI / 2
f).ToRotationVector2() *
num3;
268 }
269 if (((Vector2)(
ref ent.velocity)).Length() <
num3)
270 {
272 ent.velocity *=
num3;
273 }
276 {
277 vector3 = Vector2.UnitX * (float)
ent.direction;
278 }
279 ent.velocity =
vector3 * ((Vector2)(
ref ent.velocity)).Length();
281 {
282 ent.velocity.Y = (float)(-
num) * 0.1f;
283 }
285 int lastPortalColorIndex =
num4 + ((
num4 % 2 == 0) ? 1 : (-1));
287 {
289 player.lastPortalColorIndex = lastPortalColorIndex;
291 if (Main.netMode == 1)
292 {
293 NetMessage.SendData(96, -1, -1,
null, player.whoAmI,
vector.X,
vector.Y,
num4);
294 NetMessage.SendData(13, -1, -1, null, player.whoAmI);
295 }
297 }
299 {
301 nPC.lastPortalColorIndex = lastPortalColorIndex;
303 if (Main.netMode == 2)
304 {
306 NetMessage.SendData(23, -1, -1,
null,
nPC.whoAmI);
307 }
310 {
311 ent.velocity.Y = -3
f;
312 }
313 }
314 return;
315 }
316 }
317 }
static int[,] FoundPortals
static bool anyPortalAtAll
static Vector2 GetPortalOutingPoint(Vector2 objectSize, Vector2 portalPosition, float portalAngle, out int bonusX, out int bonusY)
static void GetPortalEdges(Vector2 position, float angle, out Vector2 start, out Vector2 end)
static int[] PortalCooldownForNPCs
static int[] PortalCooldownForPlayers