Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateFrame()

void Terraria.Mount.UpdateFrame ( Player mountedPlayer,
int state,
Vector2 velocity )
inline

Definition at line 3023 of file Mount.cs.

3024 {
3025 if (_frameState != state)
3026 {
3028 if (_type != 48 || (state != 1 && state != 2))
3029 {
3030 _frameCounter = 0f;
3031 }
3032 }
3033 if (state != 0)
3034 {
3035 _idleTime = 0;
3036 }
3037 if (_data.emitsLight)
3038 {
3039 Point point = mountedPlayer.Center.ToTileCoordinates();
3040 Lighting.AddLight(point.X, point.Y, _data.lightColor.X, _data.lightColor.Y, _data.lightColor.Z);
3041 }
3042 switch (_type)
3043 {
3044 case 52:
3045 if (state == 4)
3046 {
3047 state = 2;
3048 }
3049 break;
3050 case 17:
3052 break;
3053 case 5:
3054 if (state != 2)
3055 {
3056 _frameExtra = 0;
3057 _frameExtraCounter = 0f;
3058 }
3059 break;
3060 case 7:
3061 state = 2;
3062 break;
3063 case 49:
3064 {
3065 if (state != 4 && mountedPlayer.wet)
3066 {
3067 _frameState = (state = 4);
3068 }
3069 velocity.Length();
3070 float num5 = mountedPlayer.velocity.Y * 0.05f;
3071 if (mountedPlayer.direction < 0)
3072 {
3073 num5 *= -1f;
3074 }
3075 mountedPlayer.fullRotation = num5;
3076 mountedPlayer.fullRotationOrigin = new Vector2(mountedPlayer.width / 2, mountedPlayer.height / 2);
3077 break;
3078 }
3079 case 43:
3080 if (mountedPlayer.velocity.Y == 0f)
3081 {
3082 mountedPlayer.isPerformingPogostickTricks = false;
3083 }
3084 if (mountedPlayer.isPerformingPogostickTricks)
3085 {
3086 mountedPlayer.fullRotation += (float)mountedPlayer.direction * ((float)Math.PI * 2f) / 30f;
3087 }
3088 else
3089 {
3090 mountedPlayer.fullRotation = (float)Math.Sign(mountedPlayer.velocity.X) * Utils.GetLerpValue(0f, RunSpeed - 0.2f, Math.Abs(mountedPlayer.velocity.X), clamped: true) * 0.4f;
3091 }
3092 mountedPlayer.fullRotationOrigin = new Vector2(mountedPlayer.width / 2, (float)mountedPlayer.height * 0.8f);
3093 break;
3094 case 9:
3095 if (_aiming)
3096 {
3097 break;
3098 }
3099 _frameExtraCounter += 1f;
3100 if (_frameExtraCounter >= 12f)
3101 {
3102 _frameExtraCounter = 0f;
3103 _frameExtra++;
3104 if (_frameExtra >= 6)
3105 {
3106 _frameExtra = 0;
3107 }
3108 }
3109 break;
3110 case 46:
3111 if (state != 0)
3112 {
3113 state = 1;
3114 }
3115 if (!_aiming)
3116 {
3117 if (state == 0)
3118 {
3119 _frameExtra = 12;
3120 _frameExtraCounter = 0f;
3121 break;
3122 }
3123 if (_frameExtra < 12)
3124 {
3125 _frameExtra = 12;
3126 }
3127 _frameExtraCounter += Math.Abs(velocity.X);
3128 if (_frameExtraCounter >= 8f)
3129 {
3130 _frameExtraCounter = 0f;
3131 _frameExtra++;
3132 if (_frameExtra >= 24)
3133 {
3134 _frameExtra = 12;
3135 }
3136 }
3137 break;
3138 }
3139 if (_frameExtra < 24)
3140 {
3141 _frameExtra = 24;
3142 }
3143 _frameExtraCounter += 1f;
3144 if (_frameExtraCounter >= 3f)
3145 {
3146 _frameExtraCounter = 0f;
3147 _frameExtra++;
3148 if (_frameExtra >= 27)
3149 {
3150 _frameExtra = 24;
3151 }
3152 }
3153 break;
3154 case 8:
3155 {
3156 if (state != 0 && state != 1)
3157 {
3158 break;
3159 }
3160 Vector2 position = default(Vector2);
3161 position.X = mountedPlayer.position.X;
3162 position.Y = mountedPlayer.position.Y + (float)mountedPlayer.height;
3163 int num6 = (int)(position.X / 16f);
3164 _ = position.Y / 16f;
3165 float num7 = 0f;
3166 float num8 = mountedPlayer.width;
3167 while (num8 > 0f)
3168 {
3169 float num9 = (float)((num6 + 1) * 16) - position.X;
3170 if (num9 > num8)
3171 {
3172 num9 = num8;
3173 }
3174 num7 += Collision.GetTileRotation(position) * num9;
3175 num8 -= num9;
3176 position.X += num9;
3177 num6++;
3178 }
3179 float num10 = num7 / (float)mountedPlayer.width - mountedPlayer.fullRotation;
3180 float num11 = 0f;
3181 float num12 = (float)Math.PI / 20f;
3182 if (num10 < 0f)
3183 {
3184 num11 = ((!(num10 > 0f - num12)) ? (0f - num12) : num10);
3185 }
3186 else if (num10 > 0f)
3187 {
3188 num11 = ((!(num10 < num12)) ? num12 : num10);
3189 }
3190 if (num11 != 0f)
3191 {
3192 mountedPlayer.fullRotation += num11;
3193 if (mountedPlayer.fullRotation > (float)Math.PI / 4f)
3194 {
3195 mountedPlayer.fullRotation = (float)Math.PI / 4f;
3196 }
3197 if (mountedPlayer.fullRotation < -(float)Math.PI / 4f)
3198 {
3199 mountedPlayer.fullRotation = -(float)Math.PI / 4f;
3200 }
3201 }
3202 break;
3203 }
3204 case 10:
3205 case 40:
3206 case 41:
3207 case 42:
3208 case 47:
3209 {
3210 bool flag5 = Math.Abs(velocity.X) > DashSpeed - RunSpeed / 2f;
3211 if (state == 1)
3212 {
3213 bool flag6 = false;
3214 if (flag5)
3215 {
3216 state = 5;
3217 if (_frameExtra < 6)
3218 {
3219 flag6 = true;
3220 }
3221 _frameExtra++;
3222 }
3223 else
3224 {
3225 _frameExtra = 0;
3226 }
3227 if ((_type == 10 || _type == 47) && flag6)
3228 {
3229 int type = 6;
3230 if (_type == 10)
3231 {
3232 type = Utils.SelectRandom<int>(Main.rand, 176, 177, 179);
3233 }
3234 Vector2 vector8 = mountedPlayer.Center + new Vector2(mountedPlayer.width * mountedPlayer.direction, 0f);
3235 Vector2 vector9 = new Vector2(40f, 30f);
3236 float num22 = (float)Math.PI * 2f * Main.rand.NextFloat();
3237 for (float num23 = 0f; num23 < 14f; num23 += 1f)
3238 {
3239 Dust dust5 = Main.dust[Dust.NewDust(vector8, 0, 0, type)];
3240 Vector2 vector10 = Vector2.UnitY.RotatedBy(num23 * ((float)Math.PI * 2f) / 14f + num22);
3241 vector10 *= 0.2f * (float)_frameExtra;
3242 dust5.position = vector8 + vector10 * vector9;
3243 dust5.velocity = vector10 + new Vector2(RunSpeed - (float)(Math.Sign(velocity.X) * _frameExtra * 2), 0f);
3244 dust5.noGravity = true;
3245 if (_type == 47)
3246 {
3247 dust5.noLightEmittence = true;
3248 }
3249 dust5.scale = 1f + Main.rand.NextFloat() * 0.8f;
3250 dust5.fadeIn = Main.rand.NextFloat() * 2f;
3251 dust5.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3252 }
3253 }
3254 }
3255 if (_type == 10 && flag5)
3256 {
3257 Dust obj3 = Main.dust[Dust.NewDust(mountedPlayer.position, mountedPlayer.width, mountedPlayer.height, Utils.SelectRandom<int>(Main.rand, 176, 177, 179))];
3258 obj3.velocity = Vector2.Zero;
3259 obj3.noGravity = true;
3260 obj3.scale = 0.5f + Main.rand.NextFloat() * 0.8f;
3261 obj3.fadeIn = 1f + Main.rand.NextFloat() * 2f;
3262 obj3.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3263 }
3264 if (_type == 47 && flag5 && velocity.Y == 0f)
3265 {
3266 int num24 = (int)mountedPlayer.Center.X / 16;
3267 int num25 = (int)(mountedPlayer.position.Y + (float)mountedPlayer.height - 1f) / 16;
3268 Tile tile = Main.tile[num24, num25 + 1];
3269 if (tile != null && tile.active() && tile.liquid == 0 && WorldGen.SolidTileAllowBottomSlope(num24, num25 + 1))
3270 {
3272 {
3273 PositionInWorld = new Vector2(num24 * 16 + 8, num25 * 16 + 16)
3274 }, mountedPlayer.whoAmI);
3275 }
3276 }
3277 break;
3278 }
3279 case 44:
3280 {
3281 state = 1;
3282 bool flag3 = Math.Abs(velocity.X) > DashSpeed - RunSpeed / 4f;
3283 if (_mountSpecificData == null)
3284 {
3285 _mountSpecificData = false;
3286 }
3288 if (flag4 && !flag3)
3289 {
3290 _mountSpecificData = false;
3291 }
3292 else if (!flag4 && flag3)
3293 {
3294 _mountSpecificData = true;
3295 Vector2 vector5 = mountedPlayer.Center + new Vector2(mountedPlayer.width * mountedPlayer.direction, 0f);
3296 Vector2 vector6 = new Vector2(40f, 30f);
3297 float num17 = (float)Math.PI * 2f * Main.rand.NextFloat();
3298 for (float num18 = 0f; num18 < 20f; num18 += 1f)
3299 {
3300 Dust dust4 = Main.dust[Dust.NewDust(vector5, 0, 0, 228)];
3301 Vector2 vector7 = Vector2.UnitY.RotatedBy(num18 * ((float)Math.PI * 2f) / 20f + num17);
3302 vector7 *= 0.8f;
3303 dust4.position = vector5 + vector7 * vector6;
3304 dust4.velocity = vector7 + new Vector2(RunSpeed - (float)Math.Sign(velocity.Length()), 0f);
3305 if (velocity.X > 0f)
3306 {
3307 dust4.velocity.X *= -1f;
3308 }
3309 if (Main.rand.Next(2) == 0)
3310 {
3311 dust4.velocity *= 0.5f;
3312 }
3313 dust4.noGravity = true;
3314 dust4.scale = 1.5f + Main.rand.NextFloat() * 0.8f;
3315 dust4.fadeIn = 0f;
3316 dust4.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3317 }
3318 }
3319 int num19 = (int)RunSpeed - (int)Math.Abs(velocity.X);
3320 if (num19 <= 0)
3321 {
3322 num19 = 1;
3323 }
3324 if (Main.rand.Next(num19) == 0)
3325 {
3326 int num20 = 22;
3327 int num21 = mountedPlayer.width / 2 + 10;
3328 Vector2 bottom = mountedPlayer.Bottom;
3329 bottom.X -= num21;
3330 bottom.Y -= num20 - 6;
3331 Dust obj2 = Main.dust[Dust.NewDust(bottom, num21 * 2, num20, 228)];
3332 obj2.velocity = Vector2.Zero;
3333 obj2.noGravity = true;
3334 obj2.noLight = true;
3335 obj2.scale = 0.25f + Main.rand.NextFloat() * 0.8f;
3336 obj2.fadeIn = 0.5f + Main.rand.NextFloat() * 2f;
3337 obj2.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3338 }
3339 break;
3340 }
3341 case 45:
3342 {
3343 bool flag = Math.Abs(velocity.X) > DashSpeed * 0.9f;
3344 if (_mountSpecificData == null)
3345 {
3346 _mountSpecificData = false;
3347 }
3349 if (flag2 && !flag)
3350 {
3351 _mountSpecificData = false;
3352 }
3353 else if (!flag2 && flag)
3354 {
3355 _mountSpecificData = true;
3356 Vector2 vector2 = mountedPlayer.Center + new Vector2(mountedPlayer.width * mountedPlayer.direction, 0f);
3357 Vector2 vector3 = new Vector2(40f, 30f);
3358 float num13 = (float)Math.PI * 2f * Main.rand.NextFloat();
3359 for (float num14 = 0f; num14 < 20f; num14 += 1f)
3360 {
3361 Dust dust2 = Main.dust[Dust.NewDust(vector2, 0, 0, 6)];
3362 Vector2 vector4 = Vector2.UnitY.RotatedBy(num14 * ((float)Math.PI * 2f) / 20f + num13);
3363 vector4 *= 0.8f;
3364 dust2.position = vector2 + vector4 * vector3;
3365 dust2.velocity = vector4 + new Vector2(RunSpeed - (float)Math.Sign(velocity.Length()), 0f);
3366 if (velocity.X > 0f)
3367 {
3368 dust2.velocity.X *= -1f;
3369 }
3370 if (Main.rand.Next(2) == 0)
3371 {
3372 dust2.velocity *= 0.5f;
3373 }
3374 dust2.noGravity = true;
3375 dust2.scale = 1.5f + Main.rand.NextFloat() * 0.8f;
3376 dust2.fadeIn = 0f;
3377 dust2.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3378 }
3379 }
3380 if (flag)
3381 {
3382 int num15 = Utils.SelectRandom(Main.rand, new short[3] { 6, 6, 31 });
3383 int num16 = 6;
3384 Dust dust3 = Main.dust[Dust.NewDust(mountedPlayer.Center - new Vector2(num16, num16 - 12), num16 * 2, num16 * 2, num15)];
3385 dust3.velocity = mountedPlayer.velocity * 0.1f;
3386 if (Main.rand.Next(2) == 0)
3387 {
3388 dust3.noGravity = true;
3389 }
3390 dust3.scale = 0.7f + Main.rand.NextFloat() * 0.8f;
3391 if (Main.rand.Next(3) == 0)
3392 {
3393 dust3.fadeIn = 0.1f;
3394 }
3395 if (num15 == 31)
3396 {
3397 dust3.noGravity = true;
3398 dust3.scale *= 1.5f;
3399 dust3.fadeIn = 0.2f;
3400 }
3401 dust3.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3402 }
3403 break;
3404 }
3405 case 48:
3406 state = 1;
3407 break;
3408 case 39:
3409 _frameExtraCounter += 1f;
3410 if (_frameExtraCounter > 6f)
3411 {
3412 _frameExtraCounter = 0f;
3413 _frameExtra++;
3414 if (_frameExtra > 5)
3415 {
3416 _frameExtra = 0;
3417 }
3418 }
3419 break;
3420 case 50:
3421 if (mountedPlayer.velocity.Y == 0f)
3422 {
3423 _frameExtraCounter = 0f;
3424 _frameExtra = 3;
3425 break;
3426 }
3427 _frameExtraCounter += 1f;
3428 if (Flight())
3429 {
3430 _frameExtraCounter += 1f;
3431 }
3432 if (_frameExtraCounter > 7f)
3433 {
3434 _frameExtraCounter = 0f;
3435 _frameExtra++;
3436 if (_frameExtra > 3)
3437 {
3438 _frameExtra = 0;
3439 }
3440 }
3441 break;
3442 case 14:
3443 {
3444 bool num = Math.Abs(velocity.X) > RunSpeed / 2f;
3445 float num2 = Math.Sign(mountedPlayer.velocity.X);
3446 float num3 = 12f;
3447 float num4 = 40f;
3448 if (!num)
3449 {
3450 mountedPlayer.basiliskCharge = 0f;
3451 }
3452 else
3453 {
3454 mountedPlayer.basiliskCharge = Utils.Clamp(mountedPlayer.basiliskCharge + 1f / 180f, 0f, 1f);
3455 }
3456 if ((double)mountedPlayer.position.Y > Main.worldSurface * 16.0 + 160.0)
3457 {
3458 Lighting.AddLight(mountedPlayer.Center, 0.5f, 0.1f, 0.1f);
3459 }
3460 if (num && velocity.Y == 0f)
3461 {
3462 for (int i = 0; i < 2; i++)
3463 {
3464 Dust obj = Main.dust[Dust.NewDust(mountedPlayer.BottomLeft, mountedPlayer.width, 6, 31)];
3465 obj.velocity = new Vector2(velocity.X * 0.15f, Main.rand.NextFloat() * -2f);
3466 obj.noLight = true;
3467 obj.scale = 0.5f + Main.rand.NextFloat() * 0.8f;
3468 obj.fadeIn = 0.5f + Main.rand.NextFloat() * 1f;
3469 obj.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3470 }
3471 if (mountedPlayer.cMount == 0)
3472 {
3473 mountedPlayer.position += new Vector2(num2 * 24f, 0f);
3474 mountedPlayer.FloorVisuals(Falling: true);
3475 mountedPlayer.position -= new Vector2(num2 * 24f, 0f);
3476 }
3477 }
3478 if (num2 != (float)mountedPlayer.direction)
3479 {
3480 break;
3481 }
3482 for (int j = 0; j < (int)(3f * mountedPlayer.basiliskCharge); j++)
3483 {
3484 Dust dust = Main.dust[Dust.NewDust(mountedPlayer.BottomLeft, mountedPlayer.width, 6, 6)];
3485 Vector2 vector = mountedPlayer.Center + new Vector2(num2 * num4, num3);
3486 dust.position = mountedPlayer.Center + new Vector2(num2 * (num4 - 2f), num3 - 6f + Main.rand.NextFloat() * 12f);
3487 dust.velocity = (dust.position - vector).SafeNormalize(Vector2.Zero) * (3.5f + Main.rand.NextFloat() * 0.5f);
3488 if (dust.velocity.Y < 0f)
3489 {
3490 dust.velocity.Y *= 1f + 2f * Main.rand.NextFloat();
3491 }
3492 dust.velocity += mountedPlayer.velocity * 0.55f;
3493 dust.velocity *= mountedPlayer.velocity.Length() / RunSpeed;
3494 dust.velocity *= mountedPlayer.basiliskCharge;
3495 dust.noGravity = true;
3496 dust.noLight = true;
3497 dust.scale = 0.5f + Main.rand.NextFloat() * 0.8f;
3498 dust.fadeIn = 0.5f + Main.rand.NextFloat() * 1f;
3499 dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer);
3500 }
3501 break;
3502 }
3503 }
3504 switch (state)
3505 {
3506 case 0:
3507 if (_data.idleFrameCount != 0)
3508 {
3509 if (_type == 5)
3510 {
3511 if (_fatigue != 0f)
3512 {
3513 if (_idleTime == 0)
3514 {
3516 }
3517 }
3518 else
3519 {
3520 _idleTime = 0;
3521 _idleTimeNext = 2;
3522 }
3523 }
3524 else if (_idleTime == 0)
3525 {
3526 _idleTimeNext = Main.rand.Next(900, 1500);
3527 if (_type == 17)
3528 {
3529 _idleTimeNext = Main.rand.Next(120, 300);
3530 }
3531 }
3532 _idleTime++;
3533 }
3534 _frameCounter += 1f;
3536 {
3537 float num29 = _data.idleFrameDelay;
3538 if (_type == 5)
3539 {
3540 num29 *= 2f - 1f * _fatigue / _fatigueMax;
3541 }
3542 int num30 = (int)((float)(_idleTime - _idleTimeNext) / num29);
3543 int idleFrameCount = _data.idleFrameCount;
3544 if (num30 >= idleFrameCount)
3545 {
3546 if (_data.idleFrameLoop)
3547 {
3550 }
3551 else
3552 {
3553 _frameCounter = 0f;
3555 _idleTime = 0;
3556 }
3557 }
3558 else
3559 {
3560 _frame = _data.idleFrameStart + num30;
3561 if (_data.idleFrameLoop)
3562 {
3564 {
3566 }
3567 }
3569 {
3571 }
3572 }
3573 if (_type == 5)
3574 {
3576 }
3577 if (_type == 17)
3578 {
3580 _frame = 0;
3581 }
3582 }
3583 else
3584 {
3586 {
3588 _frame++;
3589 }
3591 {
3593 }
3594 }
3595 break;
3596 case 1:
3597 {
3598 float num26;
3599 switch (_type)
3600 {
3601 case 9:
3602 case 46:
3603 num26 = ((!_flipDraw) ? Math.Abs(velocity.X) : (0f - Math.Abs(velocity.X)));
3604 break;
3605 case 44:
3606 num26 = Math.Max(1f, Math.Abs(velocity.X) * 0.25f);
3607 break;
3608 case 48:
3609 num26 = Math.Max(0.5f, velocity.Length() * 0.125f);
3610 break;
3611 case 6:
3612 num26 = (_flipDraw ? velocity.X : (0f - velocity.X));
3613 break;
3614 case 13:
3615 num26 = (_flipDraw ? velocity.X : (0f - velocity.X));
3616 break;
3617 case 50:
3618 num26 = Math.Abs(velocity.X) * 0.5f;
3619 break;
3620 default:
3621 num26 = Math.Abs(velocity.X);
3622 break;
3623 }
3625 if (num26 >= 0f)
3626 {
3628 {
3630 _frame++;
3631 }
3633 {
3635 }
3636 }
3637 else
3638 {
3639 if (_frameCounter < 0f)
3640 {
3642 _frame--;
3643 }
3645 {
3646 _frame = _data.runningFrameStart + _data.runningFrameCount - 1;
3647 }
3648 }
3649 break;
3650 }
3651 case 3:
3652 _frameCounter += 1f;
3654 {
3656 _frame++;
3657 }
3659 {
3661 }
3662 break;
3663 case 2:
3664 _frameCounter += 1f;
3665 if (_frameCounter > (float)_data.inAirFrameDelay)
3666 {
3668 _frame++;
3669 }
3671 {
3673 }
3674 if (_type == 4)
3675 {
3676 if (velocity.Y < 0f)
3677 {
3678 _frame = 3;
3679 }
3680 else
3681 {
3682 _frame = 6;
3683 }
3684 }
3685 else if (_type == 52)
3686 {
3687 if (velocity.Y < 0f)
3688 {
3690 }
3692 {
3693 _frameCounter = 0f;
3694 }
3695 }
3696 else if (_type == 5)
3697 {
3698 float num27 = _fatigue / _fatigueMax;
3699 _frameExtraCounter += 6f - 4f * num27;
3701 {
3702 _frameExtra++;
3704 }
3706 {
3708 }
3709 }
3710 else if (_type == 23)
3711 {
3712 float num28 = mountedPlayer.velocity.Length();
3713 if (num28 < 1f)
3714 {
3715 _frame = 0;
3716 _frameCounter = 0f;
3717 }
3718 else if (num28 > 5f)
3719 {
3720 _frameCounter += 1f;
3721 }
3722 }
3723 break;
3724 case 4:
3725 {
3726 int num31 = (int)((Math.Abs(velocity.X) + Math.Abs(velocity.Y)) / 2f);
3728 if (_frameCounter > (float)_data.swimFrameDelay)
3729 {
3731 _frame++;
3732 }
3734 {
3736 }
3737 if (Type == 37 && velocity.X == 0f)
3738 {
3739 _frame = 4;
3740 }
3741 break;
3742 }
3743 case 5:
3744 {
3745 float num26 = _type switch
3746 {
3747 9 => (!_flipDraw) ? Math.Abs(velocity.X) : (0f - Math.Abs(velocity.X)),
3748 6 => _flipDraw ? velocity.X : (0f - velocity.X),
3749 13 => _flipDraw ? velocity.X : (0f - velocity.X),
3750 _ => Math.Abs(velocity.X),
3751 };
3753 if (num26 >= 0f)
3754 {
3756 {
3758 _frame++;
3759 }
3761 {
3763 }
3764 }
3765 else
3766 {
3767 if (_frameCounter < 0f)
3768 {
3770 _frame--;
3771 }
3773 {
3774 _frame = _data.dashingFrameStart + _data.dashingFrameCount - 1;
3775 }
3776 }
3777 break;
3778 }
3779 }
3780 }
static double Abs(double value)
const double PI
Definition Math.cs:16
static int Sign(decimal value)
Definition Math.cs:1202
static byte Max(byte val1, byte val2)
Definition Math.cs:738
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7
float _frameCounter
Definition Mount.cs:295
float _frameExtraCounter
Definition Mount.cs:299
bool _flipDraw
Definition Mount.cs:291
MountData _data
Definition Mount.cs:287
bool _aiming
Definition Mount.cs:323
object _mountSpecificData
Definition Mount.cs:329
float _fatigue
Definition Mount.cs:309
int _idleTimeNext
Definition Mount.cs:307
int _frameExtra
Definition Mount.cs:297
int _frameState
Definition Mount.cs:301
int _idleTime
Definition Mount.cs:305
float RunSpeed
Definition Mount.cs:404
float _fatigueMax
Definition Mount.cs:311
void UpdateFrame_GolfCart(Player mountedPlayer, int state, Vector2 velocity)
Definition Mount.cs:3823
bool Flight()
Definition Mount.cs:2487
float DashSpeed
Definition Mount.cs:441

References Terraria.Mount._aiming, Terraria.Mount._data, Terraria.Mount._fatigue, Terraria.Mount._fatigueMax, Terraria.Mount._flipDraw, Terraria.Mount._frame, Terraria.Mount._frameCounter, Terraria.Mount._frameExtra, Terraria.Mount._frameExtraCounter, Terraria.Mount._frameState, Terraria.Mount._idleTime, Terraria.Mount._idleTimeNext, Terraria.Mount._mountSpecificData, Terraria.Mount._type, System.Math.Abs(), Terraria.Tile.active(), Terraria.Lighting.AddLight(), Terraria.Graphics.Shaders.GameShaders.Armor, Terraria.Mount.MountData.dashingFrameCount, Terraria.Mount.MountData.dashingFrameDelay, Terraria.Mount.MountData.dashingFrameStart, Terraria.Mount.DashSpeed, Terraria.Main.dust, Terraria.Mount.MountData.emitsLight, Terraria.Mount.Flight(), Terraria.Mount.MountData.flyingFrameCount, Terraria.Mount.MountData.flyingFrameDelay, Terraria.Mount.MountData.flyingFrameStart, Terraria.Utils.GetLerpValue(), Terraria.Collision.GetTileRotation(), Terraria.Mount.MountData.idleFrameCount, Terraria.Mount.MountData.idleFrameDelay, Terraria.Mount.MountData.idleFrameLoop, Terraria.Mount.MountData.idleFrameStart, Terraria.Mount.MountData.inAirFrameCount, Terraria.Mount.MountData.inAirFrameDelay, Terraria.Mount.MountData.inAirFrameStart, Microsoft.Xna.Framework.Vector2.Length(), Terraria.Mount.MountData.lightColor, System.Math.Max(), Terraria.Dust.NewDust(), System.obj, System.Math.PI, Terraria.Main.rand, Terraria.GameContent.Drawing.ParticleOrchestrator.RequestParticleSpawn(), Terraria.Mount.MountData.runningFrameCount, Terraria.Mount.MountData.runningFrameDelay, Terraria.Mount.MountData.runningFrameStart, Terraria.Mount.RunSpeed, System.Math.Sign(), Terraria.WorldGen.SolidTileAllowBottomSlope(), Terraria.Mount.MountData.standingFrameCount, Terraria.Mount.MountData.standingFrameDelay, Terraria.Mount.MountData.standingFrameStart, System.state, Terraria.Mount.MountData.swimFrameCount, Terraria.Mount.MountData.swimFrameDelay, Terraria.Mount.MountData.swimFrameStart, Terraria.Main.tile, System.type, Microsoft.Xna.Framework.Vector2.UnitY, Terraria.Mount.UpdateFrame_GolfCart(), Microsoft.Xna.Framework.Graphics.Vector2, Terraria.Dust.velocity, Terraria.Main.worldSurface, Microsoft.Xna.Framework.Point.X, Microsoft.Xna.Framework.Vector2.X, Microsoft.Xna.Framework.Vector3.X, Microsoft.Xna.Framework.Point.Y, Microsoft.Xna.Framework.Vector2.Y, Microsoft.Xna.Framework.Vector3.Y, Microsoft.Xna.Framework.Vector3.Z, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.Mount.TryLanding().