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

◆ RunSpeed

float Terraria.Mount.RunSpeed
get

Definition at line 403 of file Mount.cs.

404 {
405 get
406 {
407 if (_type == 4 && _frameState == 4)
408 {
409 return _data.swimSpeed;
410 }
411 if ((_type == 12 || _type == 44 || _type == 49) && _frameState == 4)
412 {
413 return _data.swimSpeed;
414 }
415 if (_type == 12 && _frameState == 2)
416 {
417 return _data.runSpeed + 13.5f;
418 }
419 if (_type == 44 && _frameState == 2)
420 {
421 return _data.runSpeed + 4f;
422 }
423 if (_type == 5 && _frameState == 2)
424 {
425 float num = _fatigue / _fatigueMax;
426 return _data.runSpeed + 4f * (1f - num);
427 }
428 if (_type == 50 && _frameState == 2)
429 {
430 return _data.runSpeed + 2f;
431 }
433 {
434 return SuperCartRunSpeed;
435 }
436 return _data.runSpeed;
437 }
438 }
MountData _data
Definition Mount.cs:287
static float SuperCartRunSpeed
Definition Mount.cs:333
float _fatigue
Definition Mount.cs:309
bool _shouldSuperCart
Definition Mount.cs:325
int _frameState
Definition Mount.cs:301
float _fatigueMax
Definition Mount.cs:311

Referenced by Terraria.Player.SetArmorEffectVisuals(), Terraria.Mount.UpdateEffects(), and Terraria.Mount.UpdateFrame().