580 {
582 {
583 if (
m_fsm.LoadCurrentFSMState(ctx, version))
584 {
586 if (state)
587 {
589 state.SyncAnimState();
590 if (LogManager.IsWeaponLogEnable()) {
wpnDebugPrint(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon=" +
this +
" stable state loaded and synced."); }
591 return true;
592 }
593 else
594 {
595 if (LogManager.IsWeaponLogEnable()) {
wpnDebugPrint(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon=" +
this +
" unstable/error state loaded."); }
596 return false;
597 }
598 }
599 else
600 {
601 Error(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon=" +
this +
" did not load.");
602 return false;
603 }
604 }
605 else
606 {
607 Error(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon.LoadCurrentFSMState: trying to load weapon without FSM (or uninitialized weapon) this=" +
this +
" type=" +
GetType());
608 return false;
609 }
610 }
eBleedingSourceType GetType()
void wpnDebugPrint(string s)
void WeaponStableState(Weapon_Base w=NULL, WeaponStateBase parent=NULL, int anim_state=-1)
void SyncSelectionState(bool has_bullet, bool has_mag)
ref WeaponFSM m_fsm
weapon abilities
WeaponStateBase GetCurrentState()
returns currently active state
override bool HasBullet()
override bool HasMagazine()
void Error(string err)
Messagebox with error message.