summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-07-31 01:57:09 +0000
committerTim Angus <tim@ngus.net>2005-07-31 01:57:09 +0000
commit91217e0614b92948cbaa1dfc62a8f9a80a81a3fe (patch)
tree9d11e6f568b7e2795bc81f4ed7bb012708bfa163 /src
parentb673cb6f3dd2014c4437d62a3b82106b5aec750b (diff)
* Removed anticamp code
* Reduced basilisk grab time to 0.8 seconds from 1 second * Increased mdriver damage slightly
Diffstat (limited to 'src')
-rw-r--r--src/game/g_active.c34
-rw-r--r--src/game/g_buildable.c12
-rw-r--r--src/game/g_client.c1
-rw-r--r--src/game/g_cmds.c76
-rw-r--r--src/game/g_local.h4
-rw-r--r--src/game/g_weapon.c8
-rw-r--r--src/game/tremulous.h7
7 files changed, 28 insertions, 114 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 3ae9c561..fbb746da 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -663,40 +663,6 @@ void ClientTimerActions( gentity_t *ent, int msec )
damage, 0, MOD_POISON );
}
- if( client->campingAtTheArmoury )
- {
- if( client->lastBoughtAmmoTime + HUMAN_ARMOURY_CAMP_TIME < level.time )
- client->campingAtTheArmoury = qfalse;
- else
- {
- //check if there are no armouries in range
- int entityList[ MAX_GENTITIES ];
- vec3_t range = { HUMAN_ARMOURY_CAMP_DISTANCE,
- HUMAN_ARMOURY_CAMP_DISTANCE, HUMAN_ARMOURY_CAMP_DISTANCE };
- vec3_t mins, maxs;
- int i, num;
- gentity_t *armoury;
-
- VectorAdd( client->ps.origin, range, maxs );
- VectorSubtract( client->ps.origin, range, mins );
-
- num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
- for( i = 0; i < num; i++ )
- {
- armoury = &g_entities[ entityList[ i ] ];
-
- if( armoury->s.eType == ET_BUILDABLE &&
- ( armoury->s.modelindex == BA_H_ARMOURY ||
- armoury->s.modelindex == BA_H_REACTOR ||
- armoury->s.modelindex == BA_H_REPEATER ) )
- break;
- }
-
- if( i == num )
- client->campingAtTheArmoury = qfalse;
- }
- }
-
//replenish alien health
if( client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 92599d38..57480191 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1520,8 +1520,7 @@ void HRpt_Use( gentity_t *self, gentity_t *other, gentity_t *activator )
if( !BG_FindUsesEnergyForWeapon( weapon ) )
return;
- if( !other->client->campingAtTheArmoury &&
- !BG_WeaponIsFull( weapon, ps->ammo, ps->powerups ) )
+ if( !BG_WeaponIsFull( weapon, ps->ammo, ps->powerups ) )
{
BG_FindAmmoForWeapon( weapon, &maxAmmo, NULL, &maxClips );
@@ -1532,15 +1531,6 @@ void HRpt_Use( gentity_t *self, gentity_t *other, gentity_t *activator )
G_AddEvent( activator, EV_RPTUSE_SOUND, 0 );
activator->client->lastRefilTime = level.time;
-
- other->client->lastBoughtAmmoTime = level.time;
- other->client->campingAtTheArmoury = qtrue;
- }
- else
- {
- trap_SendServerCommand( other-g_entities,
- va( "print \"Move away or wait 45 seconds for ammo/energy\n\"" ) );
- return;
}
}
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 5ca073b8..23fca525 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1477,6 +1477,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
client->ps.pm_time = 100;
client->respawnTime = level.time;
+ client->lastKillTime = level.time;
client->inactivityTime = level.time + g_inactivity.integer * 1000;
client->latched_buttons = 0;
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 3a826333..67720b40 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1486,56 +1486,38 @@ G_GiveClientMaxAmmo
*/
static void G_GiveClientMaxAmmo( gentity_t *ent, qboolean buyingEnergyAmmo )
{
- int i;
- int quan, clips, maxClips;
+ int i;
+ int quan, clips, maxClips;
+ qboolean weaponType;
- if( !ent->client->campingAtTheArmoury || !ent->client->firedWeapon )
+ for( i = WP_NONE; i < WP_NUM_WEAPONS; i++ )
{
- qboolean weaponType, successfullyBought = qfalse;
-
- for( i = WP_NONE; i < WP_NUM_WEAPONS; i++ )
+ if( buyingEnergyAmmo )
+ weaponType = BG_FindUsesEnergyForWeapon( i );
+ else
+ weaponType = !BG_FindUsesEnergyForWeapon( i );
+
+ if( BG_InventoryContainsWeapon( i, ent->client->ps.stats ) &&
+ weaponType && !BG_FindInfinteAmmoForWeapon( i ) &&
+ !BG_WeaponIsFull( i, ent->client->ps.ammo, ent->client->ps.powerups ) )
{
- if( buyingEnergyAmmo )
- weaponType = BG_FindUsesEnergyForWeapon( i );
- else
- weaponType = !BG_FindUsesEnergyForWeapon( i );
+ BG_FindAmmoForWeapon( i, &quan, &clips, &maxClips );
- if( BG_InventoryContainsWeapon( i, ent->client->ps.stats ) &&
- weaponType && !BG_FindInfinteAmmoForWeapon( i ) &&
- !BG_WeaponIsFull( i, ent->client->ps.ammo, ent->client->ps.powerups ) )
+ if( buyingEnergyAmmo )
{
- BG_FindAmmoForWeapon( i, &quan, &clips, &maxClips );
+ G_AddEvent( ent, EV_RPTUSE_SOUND, 0 );
+ ent->client->lastRefilTime = level.time;
- if( buyingEnergyAmmo )
- {
- G_AddEvent( ent, EV_RPTUSE_SOUND, 0 );
- ent->client->lastRefilTime = level.time;
-
- if( BG_InventoryContainsUpgrade( UP_BATTPACK, ent->client->ps.stats ) )
- quan = (int)( (float)quan * BATTPACK_MODIFIER );
- }
- else
- G_AddEvent( ent, EV_CHANGE_WEAPON, 0 );
-
- BG_PackAmmoArray( i, ent->client->ps.ammo, ent->client->ps.powerups,
- quan, clips, maxClips );
-
- successfullyBought = qtrue;
+ if( BG_InventoryContainsUpgrade( UP_BATTPACK, ent->client->ps.stats ) )
+ quan = (int)( (float)quan * BATTPACK_MODIFIER );
}
- }
+ else
+ G_AddEvent( ent, EV_CHANGE_WEAPON, 0 );
- if( successfullyBought )
- {
- ent->client->lastBoughtAmmoTime = level.time;
- ent->client->campingAtTheArmoury = qtrue;
+ BG_PackAmmoArray( i, ent->client->ps.ammo, ent->client->ps.powerups,
+ quan, clips, maxClips );
}
}
- else
- {
- trap_SendServerCommand( ent-g_entities,
- va( "print \"Move away or wait 45 seconds for ammo/energy\n\"" ) );
- return;
- }
}
/*
@@ -1648,14 +1630,8 @@ void Cmd_Buy_f( gentity_t *ent )
BG_InventoryContainsUpgrade( UP_BATTPACK, ent->client->ps.stats ) )
quan = (int)( (float)quan * BATTPACK_MODIFIER );
- if( ent->client->firedWeapon && ent->client->campingAtTheArmoury )
- BG_PackAmmoArray( weapon, ent->client->ps.ammo, ent->client->ps.powerups,
- 0, 0, maxClips );
- else
- BG_PackAmmoArray( weapon, ent->client->ps.ammo, ent->client->ps.powerups,
- quan, clips, maxClips );
-
- ent->client->firedWeapon = qfalse;
+ BG_PackAmmoArray( weapon, ent->client->ps.ammo, ent->client->ps.powerups,
+ quan, clips, maxClips );
//force a weapon change
ent->client->ps.pm_flags |= PMF_WEAPON_SWITCH;
@@ -1664,10 +1640,6 @@ void Cmd_Buy_f( gentity_t *ent )
//set build delay/pounce etc to 0
ent->client->ps.stats[ STAT_MISC ] = 0;
- //prevent filling up ammo again soon
- //ent->client->lastBoughtAmmoTime = level.time;
- //ent->client->campingAtTheArmoury = qtrue;
-
//subtract from funds
G_AddCreditToClient( ent->client, -(short)BG_FindPriceForWeapon( weapon ), qfalse );
}
diff --git a/src/game/g_local.h b/src/game/g_local.h
index dd5c3abf..80aa8375 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -417,10 +417,6 @@ struct gclient_s
#define RAM_FRAMES 1 //TA: number of frames to wait before retriggering
int retriggerArmouryMenu; //TA: frame number to retrigger the armoury menu
-
- int lastBoughtAmmoTime;
- qboolean campingAtTheArmoury;
- qboolean firedWeapon;
};
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 525bef97..607f6c3c 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1218,35 +1218,27 @@ void FireWeapon( gentity_t *ent )
break;
case WP_MACHINEGUN:
bulletFire( ent, RIFLE_SPREAD, RIFLE_DMG, MOD_MACHINEGUN );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_SHOTGUN:
shotgunFire( ent );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_CHAINGUN:
bulletFire( ent, CHAINGUN_SPREAD, CHAINGUN_DMG, MOD_CHAINGUN );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_FLAMER:
flamerFire( ent );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_PULSE_RIFLE:
pulseRifleFire( ent );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_MASS_DRIVER:
massDriverFire( ent );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_LUCIFER_CANNON:
LCChargeFire( ent, qfalse );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_LAS_GUN:
lasGunFire( ent );
- if( ent->client ) ent->client->firedWeapon = qtrue;
break;
case WP_PAIN_SAW:
painSawFire( ent );
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 0adb4595..b75959ca 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -49,7 +49,7 @@
#define LEVEL1_CLAW_REPEAT 600
#define LEVEL1_CLAW_U_REPEAT 500
#define LEVEL1_GRAB_RANGE 64.0f
-#define LEVEL1_GRAB_TIME 1000
+#define LEVEL1_GRAB_TIME 800
#define LEVEL1_PCLOUD_DMG ADM(4)
#define LEVEL1_PCLOUD_RANGE 200.0f
#define LEVEL1_PCLOUD_REPEAT 2000
@@ -356,7 +356,7 @@
#define MDRIVER_CLIPSIZE 5
#define MDRIVER_SPAWNCLIPS 3
#define MDRIVER_MAXCLIPS 3
-#define MDRIVER_DMG HDM(31)
+#define MDRIVER_DMG HDM(35)
#define MDRIVER_REPEAT 1000
#define MDRIVER_RELOAD 2000
@@ -545,9 +545,6 @@
#define HUMAN_SPAWN_REPEAT_TIME 10000
-#define HUMAN_ARMOURY_CAMP_TIME 45000
-#define HUMAN_ARMOURY_CAMP_DISTANCE 256.0f
-
/*
* Misc
*/