DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_WeaponReady) { PARAM_ACTION_PROLOGUE; PARAM_INT_OPT(flags) { flags = 0; } DoReadyWeaponToSwitch(self, !(flags & WRF_NoSwitch)); if ((flags & WRF_NoFire) != WRF_NoFire) DoReadyWeaponToFire(self, !(flags & WRF_NoPrimary), !(flags & WRF_NoSecondary)); if (!(flags & WRF_NoBob)) DoReadyWeaponToBob(self); DoReadyWeaponToGeneric(self, flags); DoReadyWeaponDisableSwitch(self, flags & WRF_DisableSwitch); return 0; }
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_WeaponReady) { ACTION_PARAM_START(1); ACTION_PARAM_INT(paramflags, 0); DoReadyWeaponToSwitch(self, !(paramflags & WRF_NoSwitch)); if ((paramflags & WRF_NoFire) != WRF_NoFire) DoReadyWeaponToFire(self, !(paramflags & WRF_NoPrimary), !(paramflags & WRF_NoSecondary)); if (!(paramflags & WRF_NoBob)) DoReadyWeaponToBob(self); if ((paramflags & WRF_AllowReload)) DoReadyWeaponToReload(self); if ((paramflags & WRF_AllowZoom)) DoReadyWeaponToZoom(self); DoReadyWeaponDisableSwitch(self, paramflags & WRF_DisableSwitch); }