diff --git a/reaction/game/ai_dmq3.c b/reaction/game/ai_dmq3.c index 4e33ec5f..09af9811 100644 --- a/reaction/game/ai_dmq3.c +++ b/reaction/game/ai_dmq3.c @@ -5,6 +5,11 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.31 2002/05/11 12:45:25 makro +// Spectators can go through breakables and doors with +// a targetname or health. Bots should crouch more/jump less +// often when attacking at long range +// // Revision 1.30 2002/05/10 13:21:53 makro // Mainly bot stuff. Also fixed a couple of crash bugs // @@ -331,18 +336,14 @@ Added by Makro */ void BotMoveTowardsEnt(bot_state_t *bs, vec3_t dest, int dist) { vec3_t dir; - +/* VectorTargetDist(bs->origin, dest, dist, dir); //dir[2] = bs->origin[2]; - /* - if (bot_developer.integer == 2) { - G_Printf(va("^5BOT CODE: ^7Moving from (%i %i %i) towards entity at (%i %i %i) up to (%i %i %i)\n", - (int) bs->origin[0], (int) bs->origin[1], (int) bs->origin[2], - (int) dest[0], (int) dest[1], (int) dest[2], - (int) dir[0], (int) dir[1], (int) dir[2])); - } - */ BotMoveTo(bs, dir); +*/ + VectorSubtract(dest, bs->origin, dir); + VectorNormalize(dir); + trap_BotMoveInDirection(bs->ms, dir, 400, MOVE_WALK); } /* @@ -3230,6 +3231,11 @@ bot_moveresult_t BotAttackMove(bot_state_t *bs, int tfl) { VectorSubtract(entinfo.origin, bs->origin, forward); //the distance towards the enemy dist = VectorNormalize(forward); + //Makro - for long range attacks the bots should crouch more often + if (dist > 512) { + croucher = Com_Clamp(0, 1, croucher * 2.0f); + jumper = Com_Clamp(0, 1, jumper / 2.0f); + } VectorNegate(forward, backward); //walk, crouch or jump movetype = MOVE_WALK; diff --git a/reaction/game/g_misc.c b/reaction/game/g_misc.c index 222b08f8..22b94da2 100644 --- a/reaction/game/g_misc.c +++ b/reaction/game/g_misc.c @@ -5,6 +5,11 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.37 2002/05/11 12:45:25 makro +// Spectators can go through breakables and doors with +// a targetname or health. Bots should crouch more/jump less +// often when attacking at long range +// // Revision 1.36 2002/05/11 00:38:47 blaze // trigger_push and target_push default to no noise when the noise flag is not set. // @@ -78,6 +83,8 @@ extern char rq3_breakables[RQ3_MAX_BREAKABLES][80]; void G_ExplodeMissile( gentity_t *ent ); +//Makro - added +void Think_SpawnNewDoorTrigger( gentity_t *ent ); /*QUAKED func_group (0 0 0) ? Used to group brushes together just for editor convenience. They are turned into normal brushes by the utilities. @@ -638,6 +645,10 @@ void SP_func_breakable( gentity_t *ent ) { ent->s.modelindex2 = G_ModelIndex( ent->model2 ); } + //Makro - added this so spectators can go through breakables + ent->nextthink = level.time + FRAMETIME; + ent->think = Think_SpawnNewDoorTrigger; + trap_LinkEntity (ent); } diff --git a/reaction/game/g_mover.c b/reaction/game/g_mover.c index 8b93c71f..ba8aea65 100644 --- a/reaction/game/g_mover.c +++ b/reaction/game/g_mover.c @@ -5,6 +5,11 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.28 2002/05/11 12:45:25 makro +// Spectators can go through breakables and doors with +// a targetname or health. Bots should crouch more/jump less +// often when attacking at long range +// // Revision 1.27 2002/05/11 00:38:47 blaze // trigger_push and target_push default to no noise when the noise flag is not set. // @@ -1300,6 +1305,7 @@ void Think_SpawnNewDoorTrigger( gentity_t *ent ) { mins[1] += 60; } + other = G_Spawn (); other->classname = "door_trigger_spectator"; VectorCopy (mins, other->r.mins); @@ -1451,12 +1457,14 @@ void SP_func_door (gentity_t *ent) { if ( health ) { ent->takedamage = qtrue; } - if ( ent->targetname || health ) { - // non touch/shoot doors - ent->think = Think_MatchTeam; - } else { +//Makro - spectators should be able to go through doors with health/targetname +//plus, MatchTeam is called in the end, anyway +// if ( ent->targetname || health ) { +// // non touch/shoot doors +// ent->think = Think_MatchTeam; +// } else { ent->think = Think_SpawnNewDoorTrigger; - } +// } } //Elder: open areaportals for start_open doors @@ -1597,12 +1605,14 @@ void SP_func_door_rotating ( gentity_t *ent ) { if ( health ) { ent->takedamage = qtrue; } - if ( ent->targetname || health ) { - // non touch/shoot doors - ent->think = Think_MatchTeam; - } else { +//Makro - spectators should be able to go through doors with health/targetname +//plus, MatchTeam is called in the end, anyway +// if ( ent->targetname || health ) { +// // non touch/shoot doors +// ent->think = Think_MatchTeam; +// } else { ent->think = Think_SpawnNewDoorTrigger; - } +// } } } diff --git a/reaction/game/g_spawn.c b/reaction/game/g_spawn.c index 27e7f734..30471b9a 100644 --- a/reaction/game/g_spawn.c +++ b/reaction/game/g_spawn.c @@ -5,6 +5,11 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.25 2002/05/11 12:45:25 makro +// Spectators can go through breakables and doors with +// a targetname or health. Bots should crouch more/jump less +// often when attacking at long range +// // Revision 1.24 2002/05/05 15:18:02 makro // Fixed some crash bugs. Bot stuff. Triggerable func_statics. // Made flags only spawn in CTF mode @@ -755,11 +760,11 @@ void SP_worldspawn( void ) { trap_SetConfigstring( CS_MESSAGE, s ); // map specific message //Makro - color for the loading screen text - G_SpawnVector( "_color", "0.75 0.75 0.75", color ); + G_SpawnVector( "_text_color", "0.75 0.75 0.75", color ); Info_SetValueForKey(info, "r1", va("%f", color[0])); Info_SetValueForKey(info, "g1", va("%f", color[1])); Info_SetValueForKey(info, "b1", va("%f", color[2])); - G_SpawnVector( "_color2", "1 1 1", color ); + G_SpawnVector( "_text_color2", "1 1 1", color ); Info_SetValueForKey(info, "r2", va("%f", color[0])); Info_SetValueForKey(info, "g2", va("%f", color[1])); Info_SetValueForKey(info, "b2", va("%f", color[2])); diff --git a/reaction/game/game.plg b/reaction/game/game.plg index ccd7a28e..6733a2b4 100644 --- a/reaction/game/game.plg +++ b/reaction/game/game.plg @@ -6,13 +6,13 @@ --------------------Configuration: game - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1AC.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP235.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_dmnet.c" +"C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1AC.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1AD.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP235.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP236.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 @@ -55,10 +55,10 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows \reactionoutput\zcam.obj \reactionoutput\zcam_target.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1AD.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP236.tmp"

Output Window

Compiling... -ai_dmnet.c +ai_dmq3.c Linking... Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp