mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
Bots should crouch more often when they attack with a SSG
Made this depend on skill. Also, elevator stuff
This commit is contained in:
parent
09eaae5826
commit
ef7db672d6
6 changed files with 54 additions and 19 deletions
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.36 2002/05/23 18:37:50 makro
|
||||
// Bots should crouch more often when they attack with a SSG
|
||||
// Made this depend on skill. Also, elevator stuff
|
||||
//
|
||||
// Revision 1.35 2002/05/19 15:43:51 makro
|
||||
// Bots now know about weapon modes. Just for grenades so far.
|
||||
//
|
||||
|
@ -3354,9 +3358,10 @@ bot_moveresult_t BotAttackMove(bot_state_t *bs, int tfl) {
|
|||
//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.1f, 1, croucher * 2.0f);
|
||||
jumper = Com_Clamp(0, 1, jumper / 2.0f);
|
||||
// same for sniper now; also added skill as a factor
|
||||
if ( dist > 512 || (dist > 128 && bs->cur_ps.weapon == WP_SSG3000) ) {
|
||||
croucher = Com_Clamp(0.1f, 1, croucher * (attack_skill + 1));
|
||||
jumper = Com_Clamp(0, 1, jumper / (attack_skill + 1));
|
||||
}
|
||||
VectorNegate(forward, backward);
|
||||
//walk, crouch or jump
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.45 2002/05/23 18:37:50 makro
|
||||
// Bots should crouch more often when they attack with a SSG
|
||||
// Made this depend on skill. Also, elevator stuff
|
||||
//
|
||||
// Revision 1.44 2002/05/23 15:55:25 makro
|
||||
// Elevators
|
||||
//
|
||||
|
@ -700,7 +704,7 @@ void SP_func_breakable( gentity_t *ent ) {
|
|||
|
||||
trap_LinkEntity (ent);
|
||||
|
||||
//Makro - added
|
||||
//Makro - added for elevators
|
||||
if (G_SpawnString( "pathtarget","", &s)) {
|
||||
Q_strncpyz(ent->pathtarget, s, sizeof(ent->pathtarget));
|
||||
}
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.38 2002/05/23 18:37:50 makro
|
||||
// Bots should crouch more often when they attack with a SSG
|
||||
// Made this depend on skill. Also, elevator stuff
|
||||
//
|
||||
// Revision 1.37 2002/05/23 15:55:25 makro
|
||||
// Elevators
|
||||
//
|
||||
|
@ -1110,7 +1114,7 @@ void InitMover( gentity_t *ent ) {
|
|||
ent->s.pos.trDuration = 1;
|
||||
}
|
||||
|
||||
//Makro - added
|
||||
//Makro - added for elevators
|
||||
if (G_SpawnString( "pathtarget","", &sound)) {
|
||||
Q_strncpyz(ent->pathtarget, sound, sizeof(ent->pathtarget));
|
||||
}
|
||||
|
@ -1736,7 +1740,7 @@ void InitRotator( gentity_t *ent ) {
|
|||
ent->s.apos.trDuration = 1;
|
||||
}
|
||||
|
||||
//Makro - added
|
||||
//Makro - added for elevators
|
||||
if (G_SpawnString( "pathtarget","", &sound)) {
|
||||
Q_strncpyz(ent->pathtarget, sound, sizeof(ent->pathtarget));
|
||||
}
|
||||
|
@ -2249,6 +2253,7 @@ The train spawns at the first target it is pointing at.
|
|||
void SP_func_train (gentity_t *self) {
|
||||
VectorClear (self->s.angles);
|
||||
|
||||
/* Makro - more power to the mappa' !
|
||||
if (self->spawnflags & TRAIN_BLOCK_STOPS) {
|
||||
self->damage = 0;
|
||||
} else {
|
||||
|
@ -2256,6 +2261,7 @@ void SP_func_train (gentity_t *self) {
|
|||
self->damage = 2;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if ( !self->speed ) {
|
||||
self->speed = 100;
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.6 2002/05/23 18:37:50 makro
|
||||
// Bots should crouch more often when they attack with a SSG
|
||||
// Made this depend on skill. Also, elevator stuff
|
||||
//
|
||||
// Revision 1.5 2002/05/23 15:55:25 makro
|
||||
// Elevators
|
||||
//
|
||||
|
@ -100,6 +104,8 @@ void Use_Target_Delay( gentity_t *ent, gentity_t *other, gentity_t *activator )
|
|||
}
|
||||
|
||||
void SP_target_delay( gentity_t *ent ) {
|
||||
char *s;
|
||||
|
||||
// check delay for backwards compatability
|
||||
if ( !G_SpawnFloat( "delay", "0", &ent->wait ) ) {
|
||||
G_SpawnFloat( "wait", "1", &ent->wait );
|
||||
|
@ -108,6 +114,12 @@ void SP_target_delay( gentity_t *ent ) {
|
|||
if ( !ent->wait ) {
|
||||
ent->wait = 1;
|
||||
}
|
||||
|
||||
//Makro - added for elevators
|
||||
if (G_SpawnString( "pathtarget","", &s)) {
|
||||
Q_strncpyz(ent->pathtarget, s, sizeof(ent->pathtarget));
|
||||
}
|
||||
|
||||
ent->use = Use_Target_Delay;
|
||||
}
|
||||
|
||||
|
@ -139,12 +151,11 @@ If "private", only the activator gets the message. If no checks, all clients ge
|
|||
*/
|
||||
void Use_Target_Print (gentity_t *ent, gentity_t *other, gentity_t *activator) {
|
||||
//Makro - crash bug fix
|
||||
if (activator == NULL)
|
||||
return;
|
||||
|
||||
if ( activator->client && ( ent->spawnflags & 4 ) ) {
|
||||
trap_SendServerCommand( activator-g_entities, va("cp \"%s\"", ent->message ));
|
||||
return;
|
||||
if (activator) {
|
||||
if ( activator->client && ( ent->spawnflags & 4 ) ) {
|
||||
trap_SendServerCommand( activator-g_entities, va("cp \"%s\"", ent->message ));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ent->spawnflags & 3 ) {
|
||||
|
@ -398,6 +409,11 @@ void target_relay_use (gentity_t *self, gentity_t *other, gentity_t *activator)
|
|||
}
|
||||
|
||||
void SP_target_relay (gentity_t *self) {
|
||||
char *s;
|
||||
//Makro - added for elevators
|
||||
if (G_SpawnString( "pathtarget","", &s)) {
|
||||
Q_strncpyz(self->pathtarget, s, sizeof(self->pathtarget));
|
||||
}
|
||||
self->use = target_relay_use;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.17 2002/05/23 18:37:50 makro
|
||||
// Bots should crouch more often when they attack with a SSG
|
||||
// Made this depend on skill. Also, elevator stuff
|
||||
//
|
||||
// Revision 1.16 2002/05/23 15:55:25 makro
|
||||
// Elevators
|
||||
//
|
||||
|
@ -55,7 +59,7 @@ void InitTrigger( gentity_t *self ) {
|
|||
self->r.contents = CONTENTS_TRIGGER; // replaces the -1 from trap_SetBrushModel
|
||||
self->r.svFlags = SVF_NOCLIENT;
|
||||
|
||||
//Makro - added
|
||||
//Makro - added for elevators
|
||||
if (G_SpawnString( "pathtarget","", &s)) {
|
||||
Q_strncpyz(self->pathtarget, s, sizeof(self->pathtarget));
|
||||
}
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
--------------------Configuration: game - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6C4.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6F3.tmp" with contents
|
||||
[
|
||||
/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "BUILDING_REF_GL" /D "DEBUG" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_misc.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\ai_dmq3.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6C4.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6C5.tmp" with contents
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6F3.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6F4.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:yes /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /debug /machine:I386 /def:".\game.def" /out:"..\Debug/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\RSP6C5.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6F4.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
g_misc.c
|
||||
ai_dmq3.c
|
||||
Linking...
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue