mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
Bots
This commit is contained in:
parent
fae745ea72
commit
c8e3138029
6 changed files with 78 additions and 60 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.26 2002/05/04 01:03:42 makro
|
||||||
|
// Bots
|
||||||
|
//
|
||||||
// Revision 1.25 2002/05/03 18:09:19 makro
|
// Revision 1.25 2002/05/03 18:09:19 makro
|
||||||
// Bot stuff. Jump kicks
|
// Bot stuff. Jump kicks
|
||||||
//
|
//
|
||||||
|
@ -1583,10 +1586,11 @@ Added by Makro
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void BotRQ3TPSeekGoals( bot_state_t *bs ) {
|
void BotRQ3TPSeekGoals( bot_state_t *bs ) {
|
||||||
|
/*
|
||||||
int firstBot = -1, firstHuman = -1, leader = -1, i;
|
int firstBot = -1, firstHuman = -1, leader = -1, i;
|
||||||
static int maxclients;
|
static int maxclients;
|
||||||
|
|
||||||
//if the bot already has a goal
|
//if the bot already has a goal
|
||||||
if (bs->ltgtype || bs->ltg_time < FloatTime())
|
if (bs->ltgtype || bs->ltg_time < FloatTime())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1633,7 +1637,7 @@ void BotRQ3TPSeekGoals( bot_state_t *bs ) {
|
||||||
bs->ltgtype = LTG_TEAMACCOMPANY;
|
bs->ltgtype = LTG_TEAMACCOMPANY;
|
||||||
bs->formation_dist = 3.5 * 32; //3.5 meter
|
bs->formation_dist = 3.5 * 32; //3.5 meter
|
||||||
BotSetTeamStatus(bs);
|
BotSetTeamStatus(bs);
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.7 2002/05/04 01:03:42 makro
|
||||||
|
// Bots
|
||||||
|
//
|
||||||
// Revision 1.6 2002/03/31 19:16:55 makro
|
// Revision 1.6 2002/03/31 19:16:55 makro
|
||||||
// Bandaging, reloading, opening rotating doors (still needs a lot of), shooting breakables
|
// Bandaging, reloading, opening rotating doors (still needs a lot of), shooting breakables
|
||||||
//
|
//
|
||||||
|
@ -188,7 +191,12 @@ int BotAI_GetEntityState( int entityNum, entityState_t *state ) {
|
||||||
memset( state, 0, sizeof(entityState_t) );
|
memset( state, 0, sizeof(entityState_t) );
|
||||||
if (!ent->inuse) return qfalse;
|
if (!ent->inuse) return qfalse;
|
||||||
if (!ent->r.linked) return qfalse;
|
if (!ent->r.linked) return qfalse;
|
||||||
if (ent->r.svFlags & SVF_NOCLIENT) return qfalse;
|
//Makro - hack for bots
|
||||||
|
//if (ent->r.svFlags & SVF_NOCLIENT) return qfalse;
|
||||||
|
if (ent->r.svFlags & SVF_NOCLIENT)
|
||||||
|
if ( !(ent->s.eFlags & EF_NODRAW) )
|
||||||
|
return qfalse;
|
||||||
|
//end Makro
|
||||||
memcpy( state, &ent->s, sizeof(entityState_t) );
|
memcpy( state, &ent->s, sizeof(entityState_t) );
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
|
@ -1470,10 +1478,19 @@ int BotAIStartFrame(int time) {
|
||||||
trap_BotLibUpdateEntity(i, NULL);
|
trap_BotLibUpdateEntity(i, NULL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (ent->r.svFlags & SVF_NOCLIENT) {
|
if (ent->r.svFlags & SVF_NOCLIENT) {
|
||||||
trap_BotLibUpdateEntity(i, NULL);
|
trap_BotLibUpdateEntity(i, NULL);
|
||||||
continue;
|
continue;
|
||||||
|
}*/
|
||||||
|
//Makro - hack for bots
|
||||||
|
if (ent->r.svFlags & SVF_NOCLIENT) {
|
||||||
|
if ( !(ent->s.eFlags & EF_NODRAW) ) {
|
||||||
|
trap_BotLibUpdateEntity(i, NULL);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
//end Makro
|
||||||
// do not update missiles
|
// do not update missiles
|
||||||
if (ent->s.eType == ET_MISSILE) {
|
if (ent->s.eType == ET_MISSILE) {
|
||||||
trap_BotLibUpdateEntity(i, NULL);
|
trap_BotLibUpdateEntity(i, NULL);
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.35 2002/05/04 01:03:43 makro
|
||||||
|
// Bots
|
||||||
|
//
|
||||||
// Revision 1.34 2002/04/30 01:23:05 jbravo
|
// Revision 1.34 2002/04/30 01:23:05 jbravo
|
||||||
// Changed the server logging to be more like a normal AQ server. Cleaned
|
// Changed the server logging to be more like a normal AQ server. Cleaned
|
||||||
// all colors from the logs.
|
// all colors from the logs.
|
||||||
|
@ -1144,6 +1147,17 @@ void FinishSpawningItem( gentity_t *ent ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Makro - for bots and TP
|
||||||
|
if (ent != NULL) {
|
||||||
|
if (ent->item != NULL) {
|
||||||
|
if (ent->item->giType == IT_WEAPON || ent->item->giType == IT_AMMO) {
|
||||||
|
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||||
|
ent->r.svFlags |= SVF_NOCLIENT;
|
||||||
|
ent->s.eFlags |= EF_NODRAW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
trap_LinkEntity (ent);
|
trap_LinkEntity (ent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.22 2002/05/04 01:03:43 makro
|
||||||
|
// Bots
|
||||||
|
//
|
||||||
// Revision 1.21 2002/05/02 23:05:25 makro
|
// Revision 1.21 2002/05/02 23:05:25 makro
|
||||||
// Loading screen. Jump kicks. Bot stuff
|
// Loading screen. Jump kicks. Bot stuff
|
||||||
//
|
//
|
||||||
|
@ -421,6 +424,7 @@ qboolean G_CallSpawn( gentity_t *ent ) {
|
||||||
// check item spawn functions
|
// check item spawn functions
|
||||||
|
|
||||||
// JBravo: No weapons and items on the maps in teamplay
|
// JBravo: No weapons and items on the maps in teamplay
|
||||||
|
/*
|
||||||
if (g_gametype.integer != GT_TEAMPLAY) {
|
if (g_gametype.integer != GT_TEAMPLAY) {
|
||||||
for ( item=bg_itemlist+1 ; item->classname ; item++ ) {
|
for ( item=bg_itemlist+1 ; item->classname ; item++ ) {
|
||||||
if ( !strcmp(item->classname, ent->classname) ) {
|
if ( !strcmp(item->classname, ent->classname) ) {
|
||||||
|
@ -428,6 +432,18 @@ qboolean G_CallSpawn( gentity_t *ent ) {
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
//Makro - new code
|
||||||
|
for ( item=bg_itemlist+1 ; item->classname ; item++ ) {
|
||||||
|
if ( !strcmp(item->classname, ent->classname) ) {
|
||||||
|
G_SpawnItem( ent, item );
|
||||||
|
/*
|
||||||
|
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||||
|
ent->r.svFlags |= SVF_NOCLIENT;
|
||||||
|
ent->s.eFlags |= EF_NODRAW;
|
||||||
|
}*/
|
||||||
|
return qtrue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check normal spawn functions
|
// check normal spawn functions
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.74 2002/05/04 01:03:43 makro
|
||||||
|
// Bots
|
||||||
|
//
|
||||||
// Revision 1.73 2002/05/02 00:02:19 jbravo
|
// Revision 1.73 2002/05/02 00:02:19 jbravo
|
||||||
// Added a fix for the incorrect weapon at spawns
|
// Added a fix for the incorrect weapon at spawns
|
||||||
//
|
//
|
||||||
|
@ -461,6 +464,9 @@ void CleanLevel()
|
||||||
continue;
|
continue;
|
||||||
if (!ent->item)
|
if (!ent->item)
|
||||||
continue;
|
continue;
|
||||||
|
//Makro - added this for bots
|
||||||
|
if (ent->r.svFlags & SVF_NOCLIENT)
|
||||||
|
continue;
|
||||||
if (ent->item->giType == IT_WEAPON) {
|
if (ent->item->giType == IT_WEAPON) {
|
||||||
switch (ent->item->giTag) {
|
switch (ent->item->giTag) {
|
||||||
case WP_MP5:
|
case WP_MP5:
|
||||||
|
|
|
@ -3,71 +3,32 @@
|
||||||
<pre>
|
<pre>
|
||||||
<h1>Build Log</h1>
|
<h1>Build Log</h1>
|
||||||
<h3>
|
<h3>
|
||||||
|
--------------------Configuration: cgame - Win32 Release--------------------
|
||||||
|
</h3>
|
||||||
|
<h3>Command Lines</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Results</h3>
|
||||||
|
cgamex86.dll - 0 error(s), 0 warning(s)
|
||||||
|
<h3>
|
||||||
--------------------Configuration: game - Win32 Release--------------------
|
--------------------Configuration: game - Win32 Release--------------------
|
||||||
</h3>
|
</h3>
|
||||||
<h3>Command Lines</h3>
|
<h3>Command Lines</h3>
|
||||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP22B0.tmp" with contents
|
|
||||||
[
|
|
||||||
/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c
|
|
||||||
"C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c"
|
|
||||||
"C:\Games\Quake3\rq3source\reaction\game\ai_team.c"
|
|
||||||
]
|
|
||||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP22B0.tmp"
|
|
||||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP22B1.tmp" with contents
|
|
||||||
[
|
|
||||||
kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib"
|
|
||||||
\reactionoutput\ai_chat.obj
|
|
||||||
\reactionoutput\ai_cmd.obj
|
|
||||||
\reactionoutput\ai_dmnet.obj
|
|
||||||
\reactionoutput\ai_dmq3.obj
|
|
||||||
\reactionoutput\ai_main.obj
|
|
||||||
\reactionoutput\ai_team.obj
|
|
||||||
\reactionoutput\ai_vcmd.obj
|
|
||||||
\reactionoutput\bg_misc.obj
|
|
||||||
\reactionoutput\bg_pmove.obj
|
|
||||||
\reactionoutput\bg_slidemove.obj
|
|
||||||
\reactionoutput\g_active.obj
|
|
||||||
\reactionoutput\g_arenas.obj
|
|
||||||
\reactionoutput\g_bot.obj
|
|
||||||
\reactionoutput\g_client.obj
|
|
||||||
\reactionoutput\g_cmds.obj
|
|
||||||
\reactionoutput\g_combat.obj
|
|
||||||
\reactionoutput\g_fileio.obj
|
|
||||||
\reactionoutput\g_items.obj
|
|
||||||
\reactionoutput\g_main.obj
|
|
||||||
\reactionoutput\g_matchmode.obj
|
|
||||||
\reactionoutput\g_mem.obj
|
|
||||||
\reactionoutput\g_misc.obj
|
|
||||||
\reactionoutput\g_missile.obj
|
|
||||||
\reactionoutput\g_mover.obj
|
|
||||||
\reactionoutput\g_session.obj
|
|
||||||
\reactionoutput\g_spawn.obj
|
|
||||||
\reactionoutput\g_svcmds.obj
|
|
||||||
\reactionoutput\g_syscalls.obj
|
|
||||||
\reactionoutput\g_target.obj
|
|
||||||
\reactionoutput\g_team.obj
|
|
||||||
\reactionoutput\g_teamplay.obj
|
|
||||||
\reactionoutput\g_trigger.obj
|
|
||||||
\reactionoutput\g_utils.obj
|
|
||||||
\reactionoutput\g_weapon.obj
|
|
||||||
\reactionoutput\q_math.obj
|
|
||||||
\reactionoutput\q_shared.obj
|
|
||||||
\reactionoutput\rxn_game.obj
|
|
||||||
\reactionoutput\zcam.obj
|
|
||||||
\reactionoutput\zcam_target.obj
|
|
||||||
]
|
|
||||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP22B1.tmp"
|
|
||||||
<h3>Output Window</h3>
|
|
||||||
Compiling...
|
|
||||||
ai_dmq3.c
|
|
||||||
ai_team.c
|
|
||||||
Linking...
|
|
||||||
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Results</h3>
|
<h3>Results</h3>
|
||||||
qagamex86.dll - 0 error(s), 0 warning(s)
|
qagamex86.dll - 0 error(s), 0 warning(s)
|
||||||
|
<h3>
|
||||||
|
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||||
|
</h3>
|
||||||
|
<h3>Command Lines</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Results</h3>
|
||||||
|
uix86.dll - 0 error(s), 0 warning(s)
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue