578 {
580 {
581 if (
m_fsm.LoadCurrentFSMState(ctx, version))
582 {
584 if (state)
585 {
587 state.SyncAnimState();
588 if (LogManager.IsWeaponLogEnable()) {
wpnDebugPrint(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon=" +
this +
" stable state loaded and synced."); }
589 return true;
590 }
591 else
592 {
593 if (LogManager.IsWeaponLogEnable()) {
wpnDebugPrint(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon=" +
this +
" unstable/error state loaded."); }
594 return false;
595 }
596 }
597 else
598 {
599 Error(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon=" +
this +
" did not load.");
600 return false;
601 }
602 }
603 else
604 {
605 Error(
"[wpnfsm] " +
Object.GetDebugName(
this) +
" Weapon.LoadCurrentFSMState: trying to load weapon without FSM (or uninitialized weapon) this=" +
this +
" type=" +
GetType());
606 return false;
607 }
608 }
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.