summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c92
-rw-r--r--src/game/bg_public.h5
-rw-r--r--src/game/g_buildable.c8
-rw-r--r--src/game/tremulous.h22
4 files changed, 115 insertions, 12 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index de83ee5f..a53b8472 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -2859,6 +2859,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -2881,6 +2883,8 @@ weaponAttributes_t bg_weapons[ ] =
RIFLE_RELOAD, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -2903,6 +2907,8 @@ weaponAttributes_t bg_weapons[ ] =
SHOTGUN_RELOAD, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -2925,6 +2931,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -2947,6 +2955,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -2969,6 +2979,8 @@ weaponAttributes_t bg_weapons[ ] =
MDRIVER_RELOAD, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qtrue, //qboolean canZoom;
+ 20.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -2991,6 +3003,8 @@ weaponAttributes_t bg_weapons[ ] =
PRIFLE_RELOAD, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3013,6 +3027,8 @@ weaponAttributes_t bg_weapons[ ] =
LCANNON_RELOAD, //int reloadTime;
qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3035,6 +3051,8 @@ weaponAttributes_t bg_weapons[ ] =
LASGUN_RELOAD, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3057,6 +3075,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3079,6 +3099,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
HBUILD_DELAY, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3101,6 +3123,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
HBUILD2_DELAY, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3123,6 +3147,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
ABUILDER_BASE_DELAY, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3145,6 +3171,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
qtrue, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
ABUILDER_ADV_DELAY, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3167,6 +3195,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3189,6 +3219,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3211,6 +3243,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qtrue, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3233,6 +3267,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3255,6 +3291,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3277,6 +3315,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3299,6 +3339,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3321,6 +3363,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3343,6 +3387,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3365,6 +3411,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_ALIENS //WUTeam_t team;
@@ -3387,6 +3435,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3409,6 +3459,8 @@ weaponAttributes_t bg_weapons[ ] =
0, //int reloadTime;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
0, //int buildDelay;
WUT_HUMANS //WUTeam_t team;
@@ -3719,6 +3771,46 @@ qboolean BG_WeaponHasThirdMode( int weapon )
/*
==============
+BG_WeaponCanZoom
+==============
+*/
+qboolean BG_WeaponCanZoom( int weapon )
+{
+ int i;
+
+ for( i = 0; i < bg_numWeapons; i++ )
+ {
+ if( bg_weapons[ i ].weaponNum == weapon )
+ {
+ return bg_weapons[ i ].canZoom;
+ }
+ }
+
+ return qfalse;
+}
+
+/*
+==============
+BG_FindZoomFovForWeapon
+==============
+*/
+float BG_FindZoomFovForWeapon( int weapon )
+{
+ int i;
+
+ for( i = 0; i < bg_numWeapons; i++ )
+ {
+ if( bg_weapons[ i ].weaponNum == weapon )
+ {
+ return bg_weapons[ i ].zoomFov;
+ }
+ }
+
+ return qfalse;
+}
+
+/*
+==============
BG_FindPurchasableForWeapon
==============
*/
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 31c50d8e..822306a0 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -1024,6 +1024,9 @@ typedef struct
qboolean hasAltMode;
qboolean hasThirdMode;
+ qboolean canZoom;
+ float zoomFov;
+
qboolean purchasable;
int buildDelay;
@@ -1151,6 +1154,8 @@ int BG_FindRepeatRate3ForWeapon( int weapon );
int BG_FindReloadTimeForWeapon( int weapon );
qboolean BG_WeaponHasAltMode( int weapon );
qboolean BG_WeaponHasThirdMode( int weapon );
+qboolean BG_WeaponCanZoom( int weapon );
+float BG_FindZoomFovForWeapon( int weapon );
qboolean BG_FindPurchasableForWeapon( int weapon );
int BG_FindBuildDelayForWeapon( int weapon );
WUTeam_t BG_FindTeamForWeapon( int weapon );
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 5d487e4e..ac9b3cbd 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1441,6 +1441,9 @@ void HRpt_Use( gentity_t *self, gentity_t *other, gentity_t *activator )
weapon = ps->weapon;
+ if( self->health <= 0 )
+ return;
+
if( !self->spawned )
return;
@@ -1746,6 +1749,9 @@ qboolean HMGTurret_CheckTarget( gentity_t *self, gentity_t *target, qboolean ign
if( target->health <= 0 )
return qfalse;
+ if( Distance( self->s.origin, target->s.pos.trBase ) > MGTURRET_RANGE )
+ return qfalse;
+
//some turret has already selected this target
if( self->dcced && target->targeted && target->targeted->powered && !ignorePainted )
return qfalse;
@@ -2309,7 +2315,7 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance
{
if( tempent->s.eType != ET_BUILDABLE )
continue;
- if( tempent->s.modelindex == BA_A_OVERMIND )
+ if( tempent->s.modelindex == BA_A_OVERMIND && tempent->spawned )
break;
}
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 707a0929..fa8a1e71 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -22,7 +22,7 @@
*
*/
-#define ALIEN_WDMG_MODIFIER 0.85f
+#define ALIEN_WDMG_MODIFIER 0.80f
#define ADM(d) ((int)((float)d*ALIEN_WDMG_MODIFIER))
#define ABUILDER_BUILD_REPEAT 500
@@ -31,7 +31,7 @@
#define ABUILDER_CLAW_WIDTH 4.0f
#define ABUILDER_CLAW_REPEAT 1000
#define ABUILDER_BASE_DELAY 9000
-#define ABUILDER_ADV_DELAY 4000
+#define ABUILDER_ADV_DELAY 7000
#define ABUILDER_BLOB_DMG ADM(5)
#define ABUILDER_BLOB_REPEAT 1000
#define ABUILDER_BLOB_SPEED 800.0f
@@ -77,7 +77,7 @@
#define DRAGOON_POUNCE_UPG_SPEED 800
#define DRAGOON_POUNCE_SPEED_MOD 0.75f
#define DRAGOON_POUNCE_TIME 700
-#define DRAGOON_BOUNCEBALL_DMG ADM(50)
+#define DRAGOON_BOUNCEBALL_DMG ADM(100)
#define DRAGOON_BOUNCEBALL_REPEAT 1000
#define DRAGOON_BOUNCEBALL_SPEED 1000.0f
@@ -167,9 +167,9 @@
#define DRAGOON_UPG_REGEN 6
#define DRAGOON_UPG_COST 1
-#define BMOFO_SPEED 1.1f
+#define BMOFO_SPEED 1.15f
#define BMOFO_VALUE AVM(800)
-#define BMOFO_HEALTH AHM(350)
+#define BMOFO_HEALTH AHM(400)
#define BMOFO_REGEN 7
#define BMOFO_COST 2
@@ -228,7 +228,7 @@
#define ACIDTUBE_BT 15000
#define ACIDTUBE_HEALTH ABHM(200)
#define ACIDTUBE_REGEN 8
-#define ACIDTUBE_SPLASHDAMAGE 40
+#define ACIDTUBE_SPLASHDAMAGE 30
#define ACIDTUBE_SPLASHRADIUS 300
#define ACIDTUBE_CREEPSIZE 120
#define ACIDTUBE_RANGE 300.0f
@@ -243,7 +243,7 @@
#define HIVE_CREEPSIZE 120
#define HIVE_RANGE 400.0f
#define HIVE_REPEAT 10000
-#define HIVE_DMG 40
+#define HIVE_DMG 30
#define HIVE_SPEED 230.0f
#define HIVE_DIR_CHANGE_PERIOD 500
@@ -396,7 +396,7 @@
#define HBUILD2_PRICE 75
#define HBUILD2_REPEAT 1000
-#define HBUILD2_DELAY 4000
+#define HBUILD2_DELAY 7000
@@ -466,7 +466,7 @@
#define MGTURRET_BP 8
#define MGTURRET_BT 10000
-#define MGTURRET_HEALTH HBHM(500)
+#define MGTURRET_HEALTH HBHM(450)
#define MGTURRET_SPLASHDAMAGE 50
#define MGTURRET_SPLASHRADIUS 100
#define MGTURRET_ANGULARSPEED 5 //degrees/think ~= 200deg/sec
@@ -475,8 +475,8 @@
#define MGTURRET_REPEAT 100
#define MGTURRET_RANGE 250
#define MGTURRET_SPREAD 200
-#define MGTURRET_DMG HDM(6)
-#define MGTURRET_DCC_ANGULARSPEED 7
+#define MGTURRET_DMG HDM(5)
+#define MGTURRET_DCC_ANGULARSPEED 6
#define MGTURRET_DCC_ACCURACYTOLERANCE MGTURRET_DCC_ANGULARSPEED / 1.5f
#define TESLAGEN_BP 10