#define WIF_PLACABLE 1 // can be placed by level designer
typedefstructweapon_info{
sbyterender_type;// How to draw 0=laser, 1=blob, 2=object
sbytepersistent;// 0 = dies when it hits something, 1 = continues (eg, fusion cannon)
shortmodel_num;// Model num if rendertype==2.
shortmodel_num_inner;// Model num of inner part if rendertype==2.
sbyteflash_vclip;// What vclip to use for muzzle flash
sbyterobot_hit_vclip;// What vclip for impact with robot
shortflash_sound;// What sound to play when fired
sbytewall_hit_vclip;// What vclip for impact with wall
sbytefire_count;// Number of bursts fired from EACH GUN per firing. For weapons which fire from both sides, 3*fire_count shots will be fired.
shortrobot_hit_sound;// What sound for impact with robot
sbyteammo_usage;// How many units of ammunition it uses.
sbyteweapon_vclip;// Vclip to render for the weapon, itself.
shortwall_hit_sound;// What sound for impact with wall
sbytedestroyable;// If !0, this weapon can be destroyed by another weapon.
sbytematter;// Flag: set if this object is matter (as opposed to energy)
sbytebounce;// 1==always bounces, 2=bounces twice
sbytehoming_flag;// Set if this weapon can home in on a target.
ubytespeedvar;// allowed variance in speed below average, /128: 64 = 50% meaning if speed = 100, can be 50..100
ubyteflags;// see values above
sbyteflash;// Flash effect
sbyteafterburner_size;// Size of blobs in F1_0/16 units, specify in bitmaps.tbl as floating point. Player afterburner size = 2.5.
/* not present in shareware datafiles */
sbytechildren;// ID of weapon to drop if this contains children. -1 means no children.
fixenergy_usage;// How much fuel is consumed to fire this weapon.
fixfire_wait;// Time until this weapon can be fired again.
/* not present in shareware datafiles */
fixmulti_damage_scale;// Scale damage by this amount when applying to player in multiplayer. F1_0 means no change.
bitmap_indexbitmap;// Pointer to bitmap if rendertype==0 or 1.
fixblob_size;// Size of blob if blob type
fixflash_size;// How big to draw the flash
fiximpact_size;// How big of an impact
fixstrength[NDL];// How much damage it can inflict
fixspeed[NDL];// How fast it can move, difficulty level based.
fixmass;// How much mass it has
fixdrag;// How much drag it has
fixthrust;// How much thrust it has
fixpo_len_to_width_ratio;// For polyobjects, the ratio of len/width. (10 maybe?)
fixlight;// Amount of light this weapon casts.
fixlifetime;// Lifetime in seconds of this weapon.
fixdamage_radius;// Radius of damage caused by weapon, used for missiles (not lasers) to apply to damage to things it did not hit
//-- unused-- fix damage_force; // Force of damage caused by weapon, used for missiles (not lasers) to apply to damage to things it did not hit
// damage_force was a real mess. Wasn't Difficulty_level based, and was being applied instead of weapon's actual strength. Now use 2*strength instead. --MK, 01/19/95
bitmap_indexpicture;// a picture of the weapon for the cockpit
/* not present in shareware datafiles */
bitmap_indexhires_picture;// a hires picture of the above
}__pack__weapon_info;
#define REARM_TIME (F1_0)
#define WEAPON_DEFAULT_LIFETIME (F1_0*12) // Lifetime of an object if a bozo forgets to define it.
#define WEAPON_TYPE_WEAK_LASER 0
#define WEAPON_TYPE_STRONG_LASER 1
#define WEAPON_TYPE_CANNON_BALL 2
#define WEAPON_TYPE_MISSILE 3
#define MAX_WEAPON_TYPES 70
#define WEAPON_RENDER_NONE -1
#define WEAPON_RENDER_LASER 0
#define WEAPON_RENDER_BLOB 1
#define WEAPON_RENDER_POLYMODEL 2
#define WEAPON_RENDER_VCLIP 3
#define MAX_PRIMARY_WEAPONS 10
#define MAX_SECONDARY_WEAPONS 10
//given a weapon index, return the flag value
#define HAS_FLAG(index) (1<<(index))
// Weapon flags, if player->weapon_flags & WEAPON_FLAG is set, then the player has this weapon