Weapon Asset (MW3)

From COD Engine Research
Jump to: navigation, search
enum weaponIconRatioType_t 
{
  WEAPON_ICON_RATIO_1TO1 = 0x0,
  WEAPON_ICON_RATIO_2TO1 = 0x1,
  WEAPON_ICON_RATIO_4TO1 = 0x2,
  WEAPON_ICON_RATIO_COUNT = 0x3,
};
 
enum ammoCounterClipType_t 
{
  AMMO_COUNTER_CLIP_NONE = 0x0,
  AMMO_COUNTER_CLIP_MAGAZINE = 0x1,
  AMMO_COUNTER_CLIP_SHORTMAGAZINE = 0x2,
  AMMO_COUNTER_CLIP_SHOTGUN = 0x3,
  AMMO_COUNTER_CLIP_ROCKET = 0x4,
  AMMO_COUNTER_CLIP_BELTFED = 0x5,
  AMMO_COUNTER_CLIP_ALTWEAPON = 0x6,
  AMMO_COUNTER_CLIP_COUNT = 0x7,
};
 
enum weapProjExplosion_t 
{
  WEAPPROJEXP_GRENADE = 0x0,
  WEAPPROJEXP_ROCKET = 0x1,
  WEAPPROJEXP_FLASHBANG = 0x2,
  WEAPPROJEXP_NONE = 0x3,
  WEAPPROJEXP_DUD = 0x4,
  WEAPPROJEXP_SMOKE = 0x5,
  WEAPPROJEXP_HEAVY = 0x6,
  WEAPPROJEXP_NUM = 0x7,
};
 
struct AdsOverlayStruct
{
  Material *adsOverlayShader;
  Material *adsOverlayShaderLowRes;
  Material *adsOverlayShaderEMP;
  Material *adsOverlayShaderEMPLowRes;
  int adsOverlayReticle;
  float adsOverlayWidth;
  float adsOverlayHeight;
  float adsOverlayWidthSplitscreen;
  float adsOverlayHeightSplitscreeen;
};
 
struct WeaponDef
{
  const char *szOverlayName;
  XModel **gunXModels;	// loads 16
  XModel *handXModel;
  const char **szXAnimsR;		// loads 42
  const char **szXAnimsL;		// loads 42
  const char *szModeName;
  ScriptString *noteTrackSoundMap[2];
  ScriptString *noteTrackRumbleMap[2];
  int playerAnimType;
  weapType_t weaponType;
  weapClass_t weaponClass;
  PenetrateType penetrateType;
  weapInventoryType_t inventoryType;
  weapFireType_t fireType;
  OffhandClass offhandClass;
  weapStance_t stance;
  FxEffectDef *viewFlashEffect;
  FxEffectDef *worldFlashEffect;
  snd_alias_list_t *sounds[0x30];
  snd_alias_list_t **soundArray1;	//loads 0x1F
  snd_alias_list_t **soundArray2;	//loads 0x1F
  FxEffectDef *viewShellEjectEffect;
  FxEffectDef *worldShellEjectEffect;
  FxEffectDef *viewLastShotEjectEffect;
  FxEffectDef *worldLastShotEjectEffect;
  Material *reticleCenter;
  Material *reticleSide;
  int iReticleCenterSize;
  int iReticleSideSize;
  int iRreticleMinOfs;
  activeReticleType_t activeReticleType;
  float vStandMove[3];
  float vStandRot[3];
  float vStrafeMove[3];
  float vStrafeRot[3];
  float vDuckedOfs[3];
  float vDuckedMove[3];
  float vDuckedRot[3];
  float vProneOfs[3];
  float vProneMove[3];
  float vProneRot[3];
  float fPosMoveRate;
  float fPosProneMoveRate;
  float fStandMoveMinSpeed;
  float fDuckedMoveMinSpeed;
  float fProneMoveMinSpeed;
  float fPosRotRate;
  float fPosProneRotRate;
  float fStandRotMinSpeed;
  float fDuckedRotMinSpeed;
  float fProneRotMinSpeed;
  XModel **worldModel;
  XModel *worldClipModel;
  XModel *rocketModel;
  XModel *knifeModel;
  XModel *worldKnifeModel;
  Material *hudIcon;
  weaponIconRatioType_t hudIconRatio;
  Material *pickupIcon;
  weaponIconRatioType_t pickupIconRatio;
  Material *ammoCounterIcon;
  weaponIconRatioType_t ammoCounterIconRatio;
  ammoCounterClipType_t ammoCounterClip;
  int iStartAmmo;
  const char *szAmmoName;
  int iAmmoIndex;
  const char *szClipName;
  int iClipIndex;
  int iMaxAmmo;
  int shotCount;
  const char *szSharedAmmoCapName;
  int iSharedAmmoCapIndex;
  int iSharedAmmoCap;
  int damage;
  int playerDamage;
  int iMeleeDamage;
  int iDamageType;
  int iFireDelay;
  int iMeleeDelay;
  int meleeChargeDelay;
  int iDetonateDelay;
  int iRechamberTime;
  int iRechamberTimeOneHanded;
  int iRechamberBoltTime;
  int iHoldFireTime;
  int iDetonateTime;
  int iMeleeTime;
  int meleeChargeTime;
  int iReloadTime;
  int reloadShowRocketTime;
  int iReloadEmptyTime;
  int iReloadAddTime;
  int iReloadStartTime;
  int iReloadStartAddTime;
  int iReloadEndTime;
  int iDropTime;
  int iRaiseTime;
  int iAltDropTime;
  int quickDropTime;
  int quickRaiseTime;
  int iBreachRaiseTime;
  int iEmptyRaiseTime;
  int iEmptyDropTime;
  int sprintInTime;
  int sprintLoopTime;
  int sprintOutTime;
  int stunnedTimeBegin;
  int stunnedTimeLoop;
  int stunnedTimeEnd;
	char unknown12[0x18];
  int fuseTime;
  int aifuseTime;
	char unknown14[0xF0];
  float aimAssistRange;
  float aimAssistRangeAds;
  float aimPadding;
  float enemyCrosshairRange;
  float moveSpeedScale;
  float adsMoveSpeedScale;
  float sprintDurationScale;
  float fAdsZoomInFrac;
  float fAdsZoomOutFrac;
  AdsOverlayStruct adsOverlay;
	char unknown13[4];
  float fAdsBobFactor;
  float fAdsViewBobMult;
  float fHipSpreadStandMin;
  float fHipSpreadDuckedMin;
  float fHipSpreadProneMin;
  float hipSpreadStandMax;
  float hipSpreadDuckedMax;
  float hipSpreadProneMax;
  float fHipSpreadDecayRate;
  float fHipSpreadFireAdd;
  float fHipSpreadTurnAdd;
  float fHipSpreadMoveAdd;
  float fHipSpreadDuckedDecay;
  float fHipSpreadProneDecay;
  float fHipReticleSidePos;
  float fAdsIdleAmount;
  float fHipIdleAmount;
  float adsIdleSpeed;
  float hipIdleSpeed;
  float fIdleCrouchFactor;
  float fIdleProneFactor;
  float fGunMaxPitch;
  float fGunMaxYaw;
	char unknown15[8];
  float swayMaxAngle;
  float swayLerpSpeed;
  float swayPitchScale;
  float swayYawScale;
  float swayHorizScale;
  float swayVertScale;
  float swayShellShockScale;
  float adsSwayMaxAngle;
  float adsSwayLerpSpeed;
  float adsSwayPitchScale;
  float adsSwayYawScale;
  float adsSwayHorizScale;
  float adsSwayVertScale;
  float adsViewErrorMin;
  float adsViewErrorMax;
  PhysGeomList *physCollMap;
  float dualWieldViewModelOffset;
  weaponIconRatioType_t killIconRatio;
  int iReloadAmmoAdd;
  int iReloadStartAdd;
  int iDropAmmoAdd;
  int iDropAmmoMin;
  int iDropAmmoMax;
  int iExplosionRadius;
  int iExplosionRadiusMin;
  int iExplosionInnerDamage;
  int iExplosionOuterDamage;
  float damageConeAngle;
  float bulletExplDmgMult;
  float bulletExplRadiusMult;
  int iProjectileSpeed;
  int iProjectileSpeedUp;
  int iProjectileSpeedForward;
  int iProjectileActivateDist;
  float projLifetime;
  float timeToAccelerate;
  float projectileCurvature;
  XModel *projectileModel;
  weapProjExplosion_t projExplosiveType;
  FxEffectDef *projExplosionEffect;
  FxEffectDef *projDudEffect;
  snd_alias_list_t *projExplosionSound;
  snd_alias_list_t *projDudSound;
  WeapStickinessType stickiness;
  float lowAmmoWarningThreshold;
  float ricochetChance;
	char unknown4[0xC];
  float *parallelBounce;
  float *perpendicularBounce;
  FxEffectDef *projTrailEffect;
  FxEffectDef *projBeaconEffect;
  float vProjectileColor[3];
  guidedMissileType_t guidedMissileType;
  float maxSteeringAccel;
  int projIgnitionDelay;
  FxEffectDef *projIgnitionEffect;
  snd_alias_list_t *projIgnitionSound;
	char unknown14[4];
  float fAdsAimPitch;
  float fAdsCrosshairInFrac;
  float fAdsCrosshairOutFrac;
  int adsGunKickReducedKickBullets;
  float fAdsGunKickReducedKickPercent;
  float fAdsGunKickPitchMin;
  float fAdsGunKickPitchMax;
  float fAdsGunKickYawMin;
  float fAdsGunKickYawMax;
  float fAdsGunKickAccel;
  float fAdsGunKickSpeedMax;
  float fAdsGunKickSpeedDecay;
  float fAdsGunKickStaticDecay;
  float fAdsViewKickPitchMin;
  float fAdsViewKickPitchMax;
  float fAdsViewKickYawMin;
  float fAdsViewKickYawMax;
  float fAdsViewScatterMin;
  float fAdsViewScatterMax;
  float fAdsSpread;
  int hipGunKickReducedKickBullets;
  float hipGunKickReducedKickPercent;
  float fHipGunKickPitchMin;
  float fHipGunKickPitchMax;
  float fHipGunKickYawMin;
  float fHipGunKickYawMax;
  float fHipGunKickAccel;
  float fHipGunKickSpeedMax;
  float fHipGunKickSpeedDecay;
  float fHipGunKickStaticDecay;
  float fHipViewKickPitchMin;
  float fHipViewKickPitchMax;
  float fHipViewKickYawMin;
  float fHipViewKickYawMax;
  float fHipViewScatterMin;
  float fHipViewScatterMax;
  float fightDist;
  float maxDist;
  const char *accuracyGraphName[2];
  float *accuracyGraphKnots;		// count = WeaponVariantDef->accuracyGraphKnotCount
  float *originalAccuracyGraphKnots;	// count = WeaponVariantDef->originalAccuracyGraphKnotCount
  unsigned __int16 accuracyGraphKnotCount;
  unsigned __int16 originalAccuracyGraphKnotCount; 
  int iPositionReloadTransTime;
  float leftArc;
  float rightArc;
  float topArc;
  float bottomArc;
  float accuracy;
  float aiSpread;
  float playerSpread;
  float minTurnSpeed[2];
  float maxTurnSpeed[2];
  float pitchConvergenceTime;
  float yawConvergenceTime;
  float suppressionTime;
  float maxRange;
  float fAnimHorRotateInc;
  float fPlayerPositionDist;
  const char *szUseHintString;
  const char *szDropHintString;
  int iUseHintStringIndex;
  int dropHintStringIndex;
  float horizViewJitter;
  float vertViewJitter;
  float scanSpeed;
  float scanAccel;
  int scanPauseTime;
  const char *szScript;
  float fOOPosAnimLength[2];
  int minDamage;
  int minPlayerDamage;
  float fMaxDamageRange;
  float fMinDamageRange;
  float destabilizationRateTime;
  float destabilizationCurvatureMax;
  int destabilizeDistance;
  float (*locationDamageMultipliers)[20];
  const char *fireRumble;
  const char *meleeImpactRumble;
  Tracer *tracerType;
  char unknown9[0x28];
  snd_alias_list_t *turretOverheatSound;
  FxEffectDef *turretOverheatEffect;
  const char *turretBarrelSpinRumble;
  int turretBarrelSpinUpTime;
  int turretBarrelSpinDownTime;
  int turretBarrelSpinSpeed;
  snd_alias_list_t *turretBarrelSpinMaxSnd;
  snd_alias_list_t *turretBarrelSpinUpSnds[4];
  snd_alias_list_t *turretBarrelSpinDownSnds[4];
  snd_alias_list_t *missileConeSoundAlias;
  snd_alias_list_t *missileConeSoundAliasAtBase;
	char unknown10[0x3B];
  bool inheritsPerks;
  bool crosshairColorChange;
  bool rifleBullet;
  bool armorPiercing;
  bool boltAction;
  bool aimDownSight;
  bool unknown16[2];
  bool rechamberWhileAds;
  bool bBulletExplosiveDamage;
  bool cookOffHold;
  bool clipOnly;
  bool noAmmoPickup;
  bool adsFire;
  bool cancelAutoHolsterWhenEmpty;
  bool disableSwitchToWhenEmpty;
  bool suppressAmmoReserveDisplay;
  bool laserSightDuringNightvision;
  bool markableViewmodel;
  bool noDualWield;
  bool flipKillIcon;
  bool noPartialReload;
  bool segmentedReload;
  bool blocksProne;
  bool silenced;
  bool isRollingGrenade;
  bool projExplosionEffectForceNormalUp;
  bool projImpactExplode;
  bool stickToPlayers;
  bool hasDetonator;
  bool disableFiring;
  bool timedDetonation;
  bool rotate;
  bool holdButtonToThrow;
  bool freezeMovementWhenFiring;
  bool thermalScope;
  bool altModeSameWeapon;
  bool turretBarrelSpinEnabled;
  bool missileConeSoundEnabled;
  bool missileConeSoundPitchshiftEnabled;
  bool missileConeSoundCrossfadeEnabled;
  bool offhandHoldIsCancelable;
  char unused;
  ScriptString stowedBackTag;		// tag_stowed_back
  char padding[2];
  XModel *unknownModel;
};
 
struct UnknownWeaponStruct1
{
  int unknown1;
  const char *string1;
  const char *string2;
  char unknown[0xC];
};
 
struct UnknownWeaponStruct2
{
  int unknown1;
  snd_alias_list_t *sound1;
  snd_alisa_list_t *sound2;
  int unknown2;
};
 
struct UnknownWeaponStruct3
{
  int unknown1;
  FxEffectDef *effect1;
  FxEffectDef *effect2;
  int unknown2;
};
 
struct UnknownWeaponStruct4
{
  int unknown;
  ScriptString *scriptStrings1;	// loads 0x18
  ScriptString *scriptStrings2;	// loads 0x18
};
 
struct WeaponVariantDef
{
  const char *szInternalName;
  WeaponDef *weapDef;
  const char *szDisplayName;
  ScriptString *hideTags;
  AttachmentDef *attachment1;	// loads 6
  AttachmentDef *attachment2;	// loads 3
  AttachmentDef *attachment3;	// loads 4
  const char **szXAnims;		// loads 42
	int count1;
	UnknownWeaponStruct1 **struct1;	// count = count1
	int count2;
	UnknownWeaponStruct2 *struct2;	// count = count2 
	int count3;
	UnknownWeaponStruct3 *struct3;	// count = count3
	int count4;
	char *unknownData;		// size = count4 * 0xC
	int count5;
	UnknownWeaponStruct4 *struct4;	// count = count5
  int iAdsTransInTime;
  int iAdsTransOutTime;
  int iClipSize;
  ImpactType impactType;
  int iFireTime;
	int unknown1;
  weapIconRatioType_t dpadIconRatio;
  int iPenetrateMultiplier;
  float fAdsViewKickCenterSpeed;
  float fHipViewKickCenterSpeed;
  const char *szAltWeaponName;
  unsigned int altWeaponIndex;
  int iAltRaiseTime;
	int unknown2;
  Material *killIcon;
  Material *dpadIcon;
  char unknown3[0x10];
  int iDropAmmoMax;
	char unknown4[8];
  unsigned __int16 accuracyGraphKnotCount;
  unsigned __int16 originalAccuracyGraphKnotCount;
  float *accuracyGraphKnots;
  float *originalAccuracyGraphKnots;
  bool motionTracker;
  bool enhanced;
  bool dpadIconShowsAmmo;
};