| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
#define PFL_WINDOWDAMAGE 1 //projectile damages through window |
| 35 |
#define PFL_RETURN 2 //set when projectile returns to owner |
| 36 |
|
| 37 |
#define WFL_FIRERELEASED 1 //set when projectile is fired with key-up event |
| 38 |
|
| 39 |
#define DAMAGETYPE_IMPACT 1 //damage on impact |
| 40 |
#define DAMAGETYPE_RADIAL 2 //radial damage |
| 41 |
#define DAMAGETYPE_VISIBLE 4 //damage to all entities visible to the projectile |
| 42 |
|
| 43 |
typedef struct projectileinfo_s |
| 44 |
{ |
| 45 |
char name[MAX_STRINGFIELD]; |
| 46 |
char model[MAX_STRINGFIELD]; |
| 47 |
int flags; |
| 48 |
float gravity; |
| 49 |
int damage; |
| 50 |
float radius; |
| 51 |
int visdamage; |
| 52 |
int damagetype; |
| 53 |
int healthinc; |
| 54 |
float push; |
| 55 |
float detonation; |
| 56 |
float bounce; |
| 57 |
float bouncefric; |
| 58 |
float bouncestop; |
| 59 |
} projectileinfo_t; |
| 60 |
|
| 61 |
typedef struct weaponinfo_s |
| 62 |
{ |
| 63 |
int valid; |
| 64 |
int number; |
| 65 |
char name[MAX_STRINGFIELD]; |
| 66 |
char model[MAX_STRINGFIELD]; |
| 67 |
int level; |
| 68 |
int weaponindex; |
| 69 |
int flags; |
| 70 |
char projectile[MAX_STRINGFIELD]; |
| 71 |
int numprojectiles; |
| 72 |
float hspread; |
| 73 |
float vspread; |
| 74 |
float speed; |
| 75 |
float acceleration; |
| 76 |
vec3_t recoil; |
| 77 |
vec3_t offset; |
| 78 |
vec3_t angleoffset; |
| 79 |
float extrazvelocity; |
| 80 |
int ammoamount; |
| 81 |
int ammoindex; |
| 82 |
float activate; |
| 83 |
float reload; |
| 84 |
float spinup; |
| 85 |
float spindown; |
| 86 |
projectileinfo_t proj; |
| 87 |
} weaponinfo_t; |
| 88 |
|
| 89 |
|
| 90 |
int BotSetupWeaponAI(void); |
| 91 |
|
| 92 |
void BotShutdownWeaponAI(void); |
| 93 |
|
| 94 |
int BotChooseBestFightWeapon(int weaponstate, int *inventory); |
| 95 |
|
| 96 |
void BotGetWeaponInfo(int weaponstate, int weapon, weaponinfo_t *weaponinfo); |
| 97 |
|
| 98 |
int BotLoadWeaponWeights(int weaponstate, char *filename); |
| 99 |
|
| 100 |
int BotAllocWeaponState(void); |
| 101 |
|
| 102 |
void BotFreeWeaponState(int weaponstate); |
| 103 |
|
| 104 |
void BotResetWeaponState(int weaponstate); |