bots should use all weapons now

This commit is contained in:
q3rally 2016-05-17 21:00:39 +00:00
parent 0e4e4f9a7a
commit 799400495d
6 changed files with 214 additions and 166 deletions

View file

@ -1,21 +1,22 @@
/* /*
=========================================================================== ===========================================================================
Copyright (C) 1999-2005 Id Software, Inc. Copyright (C) 1999-2005 Id Software, Inc.
Copyright (C) 2002-2015 Q3Rally Team (Per Thormann - q3rally@gmail.com)
This file is part of Quake III Arena source code. This file is part of q3rally source code.
Quake III Arena source code is free software; you can redistribute it q3rally source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License, published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version. or (at your option) any later version.
Quake III Arena source code is distributed in the hope that it will be q3rally source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Foobar; if not, write to the Free Software along with q3rally; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=========================================================================== ===========================================================================
*/ */
@ -37,47 +38,44 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define INVENTORY_NAILGUN 15 #define INVENTORY_NAILGUN 15
#define INVENTORY_PROXLAUNCHER 16 #define INVENTORY_PROXLAUNCHER 16
#define INVENTORY_CHAINGUN 17 #define INVENTORY_CHAINGUN 17
//Q3Rally Code Start
#define INVENTORY_FLAMETHROWER 18
//Q3Rally Code END
//ammo //ammo
#define INVENTORY_SHELLS 18 #define INVENTORY_SHELLS 19
#define INVENTORY_BULLETS 19 #define INVENTORY_BULLETS 20
#define INVENTORY_GRENADES 20 #define INVENTORY_GRENADES 21
#define INVENTORY_CELLS 21 #define INVENTORY_CELLS 22
#define INVENTORY_LIGHTNINGAMMO 22 #define INVENTORY_LIGHTNINGAMMO 23
#define INVENTORY_ROCKETS 23 #define INVENTORY_ROCKETS 24
#define INVENTORY_SLUGS 24 #define INVENTORY_SLUGS 25
#define INVENTORY_BFGAMMO 25 #define INVENTORY_BFGAMMO 26
#define INVENTORY_NAILS 26 #define INVENTORY_NAILS 27
#define INVENTORY_MINES 27 #define INVENTORY_MINES 28
#define INVENTORY_BELT 28 #define INVENTORY_BELT 29
//powerups //powerups
#define INVENTORY_HEALTH 29 #define INVENTORY_HEALTH 30
#define INVENTORY_TELEPORTER 30 #define INVENTORY_TELEPORTER 31
#define INVENTORY_MEDKIT 31 #define INVENTORY_MEDKIT 32
#define INVENTORY_KAMIKAZE 32 #define INVENTORY_KAMIKAZE 33
#define INVENTORY_PORTAL 33 #define INVENTORY_PORTAL 34
#define INVENTORY_INVULNERABILITY 34 #define INVENTORY_INVULNERABILITY 35
#define INVENTORY_QUAD 35 #define INVENTORY_QUAD 36
#define INVENTORY_ENVIRONMENTSUIT 36 #define INVENTORY_ENVIRONMENTSUIT 37
#define INVENTORY_HASTE 37 #define INVENTORY_HASTE 38
#define INVENTORY_INVISIBILITY 38 #define INVENTORY_INVISIBILITY 39
#define INVENTORY_REGEN 39 #define INVENTORY_REGEN 40
#define INVENTORY_FLIGHT 40 #define INVENTORY_FLIGHT 41
#define INVENTORY_SCOUT 41 #define INVENTORY_SCOUT 42
#define INVENTORY_GUARD 42 #define INVENTORY_GUARD 43
#define INVENTORY_DOUBLER 43 #define INVENTORY_DOUBLER 44
#define INVENTORY_AMMOREGEN 44 #define INVENTORY_AMMOREGEN 45
#define INVENTORY_REDFLAG 45
#define INVENTORY_BLUEFLAG 46
#define INVENTORY_NEUTRALFLAG 47
#define INVENTORY_REDCUBE 48
#define INVENTORY_BLUECUBE 49
//Elimination mod: Domination inventory
#define INVENTORY_POINTWHITE 50
#define INVENTORY_POINTRED 51
#define INVENTORY_POINTBLUE 52
#define INVENTORY_REDFLAG 46
#define INVENTORY_BLUEFLAG 47
#define INVENTORY_NEUTRALFLAG 48
#define INVENTORY_REDCUBE 49
#define INVENTORY_BLUECUBE 50
//enemy stuff //enemy stuff
#define ENEMY_HORIZONTAL_DIST 200 #define ENEMY_HORIZONTAL_DIST 200
#define ENEMY_HEIGHT 201 #define ENEMY_HEIGHT 201
@ -110,62 +108,57 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define MODELINDEX_PLASMAGUN 15 #define MODELINDEX_PLASMAGUN 15
#define MODELINDEX_BFG10K 16 #define MODELINDEX_BFG10K 16
#define MODELINDEX_GRAPPLINGHOOK 17 #define MODELINDEX_GRAPPLINGHOOK 17
#define MODELINDEX_FLAMETHROWER 18
#define MODELINDEX_RWPSMOKE 19
#define MODELINDEX_RWPOIL 20
#define MODELINDEX_RWPMINE 21
#define MODELINDEX_RWPFLAME 22
#define MODELINDEX_RWPBIO 23
#define MODELINDEX_SHELLS 18
#define MODELINDEX_BULLETS 19
#define MODELINDEX_GRENADES 20
#define MODELINDEX_CELLS 21
#define MODELINDEX_LIGHTNINGAMMO 22
#define MODELINDEX_ROCKETS 23
#define MODELINDEX_SLUGS 24
#define MODELINDEX_BFGAMMO 25
#define MODELINDEX_TELEPORTER 26 #define MODELINDEX_SHELLS 24
#define MODELINDEX_MEDKIT 27 #define MODELINDEX_BULLETS 25
#define MODELINDEX_QUAD 28 #define MODELINDEX_GRENADES 26
#define MODELINDEX_ENVIRONMENTSUIT 29 #define MODELINDEX_CELLS 27
#define MODELINDEX_HASTE 30 #define MODELINDEX_LIGHTNINGAMMO 28
#define MODELINDEX_INVISIBILITY 31 #define MODELINDEX_ROCKETS 29
#define MODELINDEX_REGEN 32 #define MODELINDEX_SLUGS 30
#define MODELINDEX_FLIGHT 33 #define MODELINDEX_BFGAMMO 31
#define MODELINDEX_REDFLAG 34 #define MODELINDEX_TELEPORTER 32
#define MODELINDEX_BLUEFLAG 35 #define MODELINDEX_MEDKIT 33
#define MODELINDEX_QUAD 34
#define MODELINDEX_ENVIRONMENTSUIT 35
#define MODELINDEX_HASTE 36
#define MODELINDEX_INVISIBILITY 37
#define MODELINDEX_REGEN 38
#define MODELINDEX_FLIGHT 39
#define MODELINDEX_REDFLAG 40
#define MODELINDEX_BLUEFLAG 41
// mission pack only defines // mission pack only defines
#define MODELINDEX_KAMIKAZE 36 #define MODELINDEX_KAMIKAZE 42
#define MODELINDEX_PORTAL 37 #define MODELINDEX_PORTAL 43
#define MODELINDEX_INVULNERABILITY 38 #define MODELINDEX_INVULNERABILITY 44
#define MODELINDEX_NAILS 39 #define MODELINDEX_NAILS 45
#define MODELINDEX_MINES 40 #define MODELINDEX_MINES 46
#define MODELINDEX_BELT 41 #define MODELINDEX_BELT 47
#define MODELINDEX_SCOUT 42 #define MODELINDEX_SCOUT 48
#define MODELINDEX_GUARD 43 #define MODELINDEX_GUARD 49
#define MODELINDEX_DOUBLER 44 #define MODELINDEX_DOUBLER 50
#define MODELINDEX_AMMOREGEN 45 #define MODELINDEX_AMMOREGEN 51
#define MODELINDEX_NEUTRALFLAG 46 #define MODELINDEX_NEUTRALFLAG 52
#define MODELINDEX_REDCUBE 47 #define MODELINDEX_REDCUBE 53
#define MODELINDEX_BLUECUBE 48 #define MODELINDEX_BLUECUBE 54
#define MODELINDEX_NAILGUN 49 #define MODELINDEX_NAILGUN 55
#define MODELINDEX_PROXLAUNCHER 50 #define MODELINDEX_PROXLAUNCHER 56
#define MODELINDEX_CHAINGUN 51 #define MODELINDEX_CHAINGUN 57
//Elimination mod: Double Domination and Standard Domination
#define MODELINDEX_POINTABLUE 52
#define MODELINDEX_POINTBBLUE 53
#define MODELINDEX_POINTARED 54
#define MODELINDEX_POINTBRED 55
#define MODELINDEX_POINTAWHITE 56
#define MODELINDEX_POINTBWHITE 57
#define MODELINDEX_POINTWHITE 58
#define MODELINDEX_POINTRED 59
#define MODELINDEX_POINTBLUE 60
// //
@ -179,6 +172,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define WEAPONINDEX_PLASMAGUN 8 #define WEAPONINDEX_PLASMAGUN 8
#define WEAPONINDEX_BFG 9 #define WEAPONINDEX_BFG 9
#define WEAPONINDEX_GRAPPLING_HOOK 10 #define WEAPONINDEX_GRAPPLING_HOOK 10
#define WEAPONINDEX_NAILGUN 11 #define WEAPONINDEX_FLAMETHROWER 11
#define WEAPONINDEX_PROXLAUNCHER 12 #define WEAPONINDEX_NAILGUN 12
#define WEAPONINDEX_CHAINGUN 13 #define WEAPONINDEX_PROXLAUNCHER 13
#define WEAPONINDEX_CHAINGUN 14

View file

@ -364,25 +364,6 @@ gitem_t bg_itemlist[] =
/* sounds */ "" /* sounds */ ""
}, },
//Q3Rally Code Start
/*QUAKED weapon_flamethrower (.3 .3 1) (-16 -16 -16) (16 16 16) suspended
*/
{
"weapon_flamethrower",
"sound/misc/w_pkup.wav",
{ "models/weapons2/flamethrower/flamethrower.md3",
0, 0, 0},
/* icon */ "icons/iconw_flame",
/* pickup */ "Flame Thrower",
20,
IT_WEAPON,
WP_FLAME_THROWER,
/* precache */ "",
/* sounds */ ""
},
//Q3Rally Code END
/*QUAKED weapon_grapplinghook (.3 .3 1) (-16 -16 -16) (16 16 16) suspended /*QUAKED weapon_grapplinghook (.3 .3 1) (-16 -16 -16) (16 16 16) suspended
*/ */
@ -404,6 +385,26 @@ gitem_t bg_itemlist[] =
*/ */
// END // END
//Q3Rally Code Start
/*QUAKED weapon_flamethrower (.3 .3 1) (-16 -16 -16) (16 16 16) suspended
*/
{
"weapon_flamethrower",
"sound/misc/w_pkup.wav",
{ "models/weapons2/flamethrower/flamethrower.md3",
0, 0, 0},
/* icon */ "icons/iconw_flame",
/* pickup */ "Flame Thrower",
20,
IT_WEAPON,
WP_FLAME_THROWER,
/* precache */ "",
/* sounds */ ""
},
//Q3Rally Code END
// STONELANCE // STONELANCE
// rally_weapon_smoke // rally_weapon_smoke
{ {

View file

@ -108,53 +108,57 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define MODELINDEX_PLASMAGUN 15 #define MODELINDEX_PLASMAGUN 15
#define MODELINDEX_BFG10K 16 #define MODELINDEX_BFG10K 16
#define MODELINDEX_GRAPPLINGHOOK 17 #define MODELINDEX_GRAPPLINGHOOK 17
//Q3Rally Code Start
#define MODELINDEX_FLAMETHROWER 18 #define MODELINDEX_FLAMETHROWER 18
//Q3Rally Code END #define MODELINDEX_RWPSMOKE 19
#define MODELINDEX_RWPOIL 20
#define MODELINDEX_RWPMINE 21
#define MODELINDEX_RWPFLAME 22
#define MODELINDEX_RWPBIO 23
#define MODELINDEX_SHELLS 19
#define MODELINDEX_BULLETS 20
#define MODELINDEX_GRENADES 21
#define MODELINDEX_CELLS 22
#define MODELINDEX_LIGHTNINGAMMO 23
#define MODELINDEX_ROCKETS 24
#define MODELINDEX_SLUGS 25
#define MODELINDEX_BFGAMMO 26
#define MODELINDEX_TELEPORTER 27 #define MODELINDEX_SHELLS 24
#define MODELINDEX_MEDKIT 28 #define MODELINDEX_BULLETS 25
#define MODELINDEX_QUAD 29 #define MODELINDEX_GRENADES 26
#define MODELINDEX_ENVIRONMENTSUIT 30 #define MODELINDEX_CELLS 27
#define MODELINDEX_HASTE 31 #define MODELINDEX_LIGHTNINGAMMO 28
#define MODELINDEX_INVISIBILITY 32 #define MODELINDEX_ROCKETS 29
#define MODELINDEX_REGEN 33 #define MODELINDEX_SLUGS 30
#define MODELINDEX_FLIGHT 34 #define MODELINDEX_BFGAMMO 31
#define MODELINDEX_REDFLAG 35 #define MODELINDEX_TELEPORTER 32
#define MODELINDEX_BLUEFLAG 36 #define MODELINDEX_MEDKIT 33
#define MODELINDEX_QUAD 34
#define MODELINDEX_ENVIRONMENTSUIT 35
#define MODELINDEX_HASTE 36
#define MODELINDEX_INVISIBILITY 37
#define MODELINDEX_REGEN 38
#define MODELINDEX_FLIGHT 39
#define MODELINDEX_REDFLAG 40
#define MODELINDEX_BLUEFLAG 41
// mission pack only defines // mission pack only defines
#define MODELINDEX_KAMIKAZE 37 #define MODELINDEX_KAMIKAZE 42
#define MODELINDEX_PORTAL 38 #define MODELINDEX_PORTAL 43
#define MODELINDEX_INVULNERABILITY 39 #define MODELINDEX_INVULNERABILITY 44
#define MODELINDEX_NAILS 40 #define MODELINDEX_NAILS 45
#define MODELINDEX_MINES 41 #define MODELINDEX_MINES 46
#define MODELINDEX_BELT 42 #define MODELINDEX_BELT 47
#define MODELINDEX_SCOUT 43 #define MODELINDEX_SCOUT 48
#define MODELINDEX_GUARD 44 #define MODELINDEX_GUARD 49
#define MODELINDEX_DOUBLER 45 #define MODELINDEX_DOUBLER 50
#define MODELINDEX_AMMOREGEN 46 #define MODELINDEX_AMMOREGEN 51
#define MODELINDEX_NEUTRALFLAG 47 #define MODELINDEX_NEUTRALFLAG 52
#define MODELINDEX_REDCUBE 48 #define MODELINDEX_REDCUBE 53
#define MODELINDEX_BLUECUBE 49 #define MODELINDEX_BLUECUBE 54
#define MODELINDEX_NAILGUN 50 #define MODELINDEX_NAILGUN 55
#define MODELINDEX_PROXLAUNCHER 51 #define MODELINDEX_PROXLAUNCHER 56
#define MODELINDEX_CHAINGUN 52 #define MODELINDEX_CHAINGUN 57
// //
@ -168,6 +172,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define WEAPONINDEX_PLASMAGUN 8 #define WEAPONINDEX_PLASMAGUN 8
#define WEAPONINDEX_BFG 9 #define WEAPONINDEX_BFG 9
#define WEAPONINDEX_GRAPPLING_HOOK 10 #define WEAPONINDEX_GRAPPLING_HOOK 10
#define WEAPONINDEX_NAILGUN 11 #define WEAPONINDEX_FLAMETHROWER 11
#define WEAPONINDEX_PROXLAUNCHER 12 #define WEAPONINDEX_NAILGUN 12
#define WEAPONINDEX_CHAINGUN 13 #define WEAPONINDEX_PROXLAUNCHER 13
#define WEAPONINDEX_CHAINGUN 14

View file

@ -794,12 +794,12 @@ static void Controls_DrawKeyBinding( void *self )
{ {
menuaction_s* a; menuaction_s* a;
int x; int x;
/ int y; int y;
int b1; int b1;
// int b2; int b2;
qboolean c; qboolean c;
char name[32]; char name[32];
// char name2[32]; char name2[32];
a = (menuaction_s*) self; a = (menuaction_s*) self;
@ -816,16 +816,16 @@ static void Controls_DrawKeyBinding( void *self )
trap_Key_KeynumToStringBuf( b1, name, 32 ); trap_Key_KeynumToStringBuf( b1, name, 32 );
Q_strupr(name); Q_strupr(name);
// b2 = g_bindings[a->generic.id].bind2; b2 = g_bindings[a->generic.id].bind2;
// if (b2 != -1) if (b2 != -1)
// { {
// trap_Key_KeynumToStringBuf( b2, name2, 32 ); trap_Key_KeynumToStringBuf( b2, name2, 32 );
// Q_strupr(name2); Q_strupr(name2);
// strcat( name, " or " ); strcat( name, " or " );
strcat( name, 0 ); strcat( name, 0 );
// strcat( name, name2 ); strcat( name, name2 );
// } }
} }
if (c) if (c)

View file

@ -55,7 +55,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define BASETA "missionpack" #define BASETA "missionpack"
#ifndef PRODUCT_VERSION #ifndef PRODUCT_VERSION
#define PRODUCT_VERSION "v0.0.0.4 r156" #define PRODUCT_VERSION "v0.0.0.4 r157"
#endif #endif
#define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION #define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION

View file

@ -164,7 +164,7 @@ q3rallycode
engine\code\client\snd_openal.c engine\code\client\snd_openal.c
engine\code\client\snd_public.h engine\code\client\snd_public.h
engine\code\client\snd_wavelet.c engine\code\client\snd_wavelet.c
-game +game
engine\code\game\ai_chat.c engine\code\game\ai_chat.c
engine\code\game\ai_chat.h engine\code\game\ai_chat.h
engine\code\game\ai_cmd.c engine\code\game\ai_cmd.c
@ -426,7 +426,7 @@ q3rallycode
engine\code\null\null_main.c engine\code\null\null_main.c
engine\code\null\null_net.c engine\code\null\null_net.c
engine\code\null\null_snddma.c engine\code\null\null_snddma.c
+q3_ui -q3_ui
engine\code\q3_ui\ui.def engine\code\q3_ui\ui.def
engine\code\q3_ui\ui_addbots.c engine\code\q3_ui\ui_addbots.c
engine\code\q3_ui\ui_atoms.c engine\code\q3_ui\ui_atoms.c
@ -859,12 +859,60 @@ q3rallycode
[Open project files] [Open project files]
0=engine\code\qcommon\q_shared.h 0=engine\code\qcommon\q_shared.h
1=engine\code\q3_ui\ui_rally_controls.c 1=engine\code\q3_ui\ui_rally_controls.c
2=engine\code\game\inv.h
3=baseq3r\botfiles\inv.h
4=engine\code\game\bg_misc.c
5=engine\code\cgame\cg_rally_rearweapons.c
6=engine\code\cgame\cg_weapons.c
7=engine\code\game\bg_pmove.c
8=engine\code\game\bg_public.h
9=engine\code\game\g_rally_rearweapon.c
10=engine\code\cgame\cg_ents.c
11=engine\code\game\ai_dmq3.c
12=engine\code\game\g_active.c
13=engine\code\game\g_missile.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\game\inv.h
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=40 TopLine=40
Caret=39,58 Caret=39,58
[engine\code\q3_ui\ui_rally_controls.c] [engine\code\q3_ui\ui_rally_controls.c]
TopLine=790 TopLine=778
Caret=24,826 Caret=1,819
[engine\code\game\inv.h]
TopLine=1
Caret=34,178
[baseq3r\botfiles\inv.h]
TopLine=1
Caret=34,178
[engine\code\game\bg_misc.c]
TopLine=456
Caret=18,401
[engine\code\cgame\cg_rally_rearweapons.c]
TopLine=69
Caret=1,83
[engine\code\cgame\cg_weapons.c]
TopLine=823
Caret=1,711
[engine\code\game\bg_pmove.c]
TopLine=1824
Caret=1,1834
[engine\code\game\bg_public.h]
TopLine=459
Caret=1,475
[engine\code\game\g_rally_rearweapon.c]
TopLine=245
Caret=1,265
[engine\code\cgame\cg_ents.c]
TopLine=523
Caret=1,529
[engine\code\game\ai_dmq3.c]
TopLine=1741
Caret=1,1755
[engine\code\game\g_active.c]
TopLine=671
Caret=1,675
[engine\code\game\g_missile.c]
TopLine=226
Caret=1,258