summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_servercmds.c2
-rw-r--r--src/game/bg_misc.c69
-rw-r--r--src/game/bg_public.h5
-rw-r--r--src/game/g_buildable.c133
-rw-r--r--src/game/g_cmds.c127
-rw-r--r--src/game/g_local.h1
-rw-r--r--src/game/tremulous.h12
7 files changed, 1 insertions, 348 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index 5ad80f98..2539660b 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -550,8 +550,6 @@ void CG_Menu( int menu )
case MN_A_BUILD: trap_SendConsoleCommand( "menu tremulous_alienbuild\n" ); break;
case MN_H_BUILD: trap_SendConsoleCommand( "menu tremulous_humanbuild\n" ); break;
case MN_H_ARMOURY: trap_SendConsoleCommand( "menu tremulous_humanarmoury\n" ); break;
- case MN_H_BANK: trap_SendConsoleCommand( "menu tremulous_humanbank\n" ); break;
- case MN_A_OBANK: trap_SendConsoleCommand( "menu tremulous_alienbank\n" ); break;
case MN_H_NOROOM:
trap_Cvar_Set( "ui_dialog", "There is no room to build here. Move until the buildable turns "
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 73d56c12..01033261 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -321,7 +321,7 @@ buildableAttributes_t bg_buildableList[ ] =
BA_H_MGTURRET, //int buildNum;
"mgturret", //char *buildName;
"Machinegun Turret", //char *humanName;
- "team_human_def2", //char *entityName;
+ "team_human_mgturret", //char *entityName;
{ "models/buildables/mgturret/turret_base.md3",
"models/buildables/mgturret/turret_barrel.md3",
"models/buildables/mgturret/turret_top.md3", 0 },
@@ -419,40 +419,6 @@ buildableAttributes_t bg_buildableList[ ] =
qfalse //qboolean reactorTest;
},
{
- BA_H_BANK, //int buildNum;
- "bank", //char *buildName;
- "Bank", //char *humanName;
- "team_human_bank", //char *entityName;
- { "models/buildables/bank/bank.md3", 0, 0, 0 },
- { -25, -25, 0 }, //vec3_t mins;
- { 25, 25, 45 }, //vec3_t maxs;
- TR_GRAVITY, //trType_t traj;
- 0.0, //float bounce;
- BANK_BP, //int buildPoints;
- //( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- 0, //DISABLE BANK //int stages
- BANK_HEALTH, //int health;
- 0, //int regenRate;
- BANK_SPLASHDAMAGE, //int splashDamage;
- BANK_SPLASHRADIUS, //int splashRadius;
- MOD_HSPAWN, //int meansOfDeath;
- BIT_HUMANS, //int team;
- ( 1 << WP_HBUILD )|( 1 << WP_HBUILD2 ), //weapon_t buildWeapon;
- BANIM_IDLE1, //int idleAnim;
- 100, //int nextthink;
- 10000, //int buildTime;
- qtrue, //qboolean usable;
- 0, //int turretRange;
- 0, //int turretFireSpeed;
- WP_NONE, //weapon_t turretProjType;
- 0.95f, //float minNormal;
- qfalse, //qboolean invertNormal;
- qfalse, //qboolean creepTest;
- 0, //int creepSize;
- qfalse, //qboolean dccTest;
- qfalse //qboolean reactorTest;
- },
- {
BA_H_ARMOURY, //int buildNum;
"mcu", //char *buildName;
"Armoury", //char *humanName;
@@ -550,39 +516,6 @@ buildableAttributes_t bg_buildableList[ ] =
0, //int creepSize;
qfalse, //qboolean dccTest;
qfalse //qboolean reactorTest;
- },
- {
- BA_H_FLOATMINE, //int buildNum;
- "floatmine", //char *buildName;
- "Floatmine", //char *humanName;
- "team_human_floatmine",//char *entityName;
- { "models/buildables/floatmine/floatmine.md3", 0, 0, 0 },
- { -25, -25, -25 }, //vec3_t mins;
- { 25, 25, 25 }, //vec3_t maxs;
- TR_BUOYANCY, //trType_t traj;
- 0.2, //float bounce;
- FLOATMINE_BP, //int buildPoints;
- ( 1 << S2 )|( 1 << S3 ), //int stages
- FLOATMINE_HEALTH, //int health;
- 0, //int regenRate;
- FLOATMINE_SPLASHDAMAGE,//int splashDamage;
- FLOATMINE_SPLASHRADIUS,//int splashRadius;
- MOD_HSPAWN, //int meansOfDeath;
- BIT_HUMANS, //int team;
- ( 1 << WP_HBUILD2 ), //weapon_t buildWeapon;
- BANIM_IDLE1, //int idleAnim;
- 100, //int nextthink;
- 10000, //int buildTime;
- qfalse, //qboolean usable;
- 0, //int turretRange;
- 0, //int turretFireSpeed;
- WP_NONE, //weapon_t turretProjType;
- 0.707f, //float minNormal;
- qfalse, //qboolean invertNormal;
- qfalse, //qboolean creepTest;
- 0, //int creepSize;
- qfalse, //qboolean dccTest;
- qfalse //qboolean reactorTest;
}
};
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 469f58de..49c8430d 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -406,13 +406,10 @@ typedef enum
BA_H_ARMOURY,
BA_H_DCC,
BA_H_MEDISTAT,
- BA_H_BANK,
BA_H_REACTOR,
BA_H_REPEATER,
- BA_H_FLOATMINE,
-
BA_NUM_BUILDABLES
} buildable_t;
@@ -555,7 +552,6 @@ typedef enum
MN_A_INFEST,
MN_A_HOVEL_OCCUPIED,
MN_A_HOVEL_BLOCKED,
- MN_A_OBANK,
MN_A_NOFUNDS,
MN_A_NOEROOM,
@@ -573,7 +569,6 @@ typedef enum
MN_H_SPAWN,
MN_H_BUILD,
MN_H_ARMOURY,
- MN_H_BANK,
MN_H_NOSLOTS,
MN_H_NOFUNDS,
MN_H_ITEMHELD,
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 0f5e9998..d7b26ee4 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1309,50 +1309,6 @@ void HArmoury_Think( gentity_t *self )
-/*
-================
-HBank_Activate
-
-Called when a human activates a Bank
-================
-*/
-void HBank_Activate( gentity_t *self, gentity_t *other, gentity_t *activator )
-{
- if( self->spawned )
- {
- //only humans can activate this
- if( activator->client->ps.stats[ STAT_PTEAM ] != PTE_HUMANS )
- return;
-
- //if this is powered then call the bank menu
- if( self->powered )
- G_TriggerMenu( activator->client->ps.clientNum, MN_H_BANK );
- else
- G_TriggerMenu( activator->client->ps.clientNum, MN_H_NOPOWER );
- }
-}
-
-/*
-================
-HBank_Think
-
-Think for bank
-================
-*/
-void HBank_Think( gentity_t *self )
-{
- //make sure we have power
- self->nextthink = level.time + POWER_REFRESH_TIME;
-
- self->powered = findPower( self );
-}
-
-
-
-
-//==================================================================================
-
-
/*
@@ -1457,83 +1413,6 @@ void HMedistat_Think( gentity_t *self )
-/*
-================
-HFM_Touch
-
-Called when a floatmine is triggered
-================
-*/
-void HFM_Touch( gentity_t *self, gentity_t *other, trace_t *trace )
-{
- //can't blow up twice
- if( self->health <= 0 )
- return;
-
- if( other && other->client && other->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
- return;
-
- //go boom
- G_Damage( self, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE );
-}
-
-/*
-================
-HFM_Die
-
-Called when a floatmine dies
-================
-*/
-void HFM_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
-{
- vec3_t dir;
-
- // we don't have a valid direction, so just point straight up
- dir[ 0 ] = dir[ 1 ] = 0;
- dir[ 2 ] = -1;
-
- self->takedamage = qfalse;
-
- //do a bit of radius damage
- G_RadiusDamage( self->s.pos.trBase, self->parent, self->splashDamage,
- self->splashRadius, self, self->splashMethodOfDeath );
-
- //pretty events and item cleanup
- self->s.modelindex = 0; //don't draw the model once its destroyed
- G_AddEvent( self, EV_BUILDABLE_EXPLOSION, DirToByte( dir ) );
- self->r.contents = CONTENTS_TRIGGER;
- self->timestamp = level.time;
-
- self->think = freeBuildable;
- self->die = nullDieFunction;
- self->nextthink = level.time + 100;
-
- trap_LinkEntity( self );
-}
-
-/*
-================
-HFM_Think
-
-Think for floatmine
-================
-*/
-void HFM_Think( gentity_t *self )
-{
- //make sure we have power
- self->nextthink = level.time + POWER_REFRESH_TIME;
-
- if( !( self->powered = findPower( self ) ) )
- G_Damage( self, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE );
-}
-
-
-
-
-//==================================================================================
-
-
-
/*
================
@@ -2263,12 +2142,6 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin
built->use = HArmoury_Activate;
break;
- case BA_H_BANK:
- built->think = HBank_Think;
- built->die = HSpawn_Die;
- built->use = HBank_Activate;
- break;
-
case BA_H_DCC:
built->think = HDCC_Think;
built->die = HSpawn_Die;
@@ -2291,12 +2164,6 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin
built->use = HRpt_Use;
break;
- case BA_H_FLOATMINE:
- built->think = HFM_Think;
- built->die = HFM_Die;
- built->touch = HFM_Touch;
- break;
-
default:
//erk
break;
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 20952094..9c2c7143 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1571,129 +1571,6 @@ void Cmd_Sell_f( gentity_t *ent )
ClientUserinfoChanged( ent->client->ps.clientNum );
}
-/*
-=================
-Cmd_Deposit_f
-=================
-*/
-void Cmd_Deposit_f( gentity_t *ent )
-{
- char s[ MAX_TOKEN_CHARS ];
- int amount;
- vec3_t distance;
- int i;
- gentity_t *bankEntity;
- qboolean nearBank = qfalse;
-
- trap_Argv( 1, s, sizeof( s ) );
-
- if( ent->client->pers.teamSelection == PTE_HUMANS )
- {
- for ( i = 1, bankEntity = g_entities + i; i < level.num_entities; i++, bankEntity++ )
- {
- if( bankEntity->s.eType != ET_BUILDABLE )
- continue;
-
- if( bankEntity->s.modelindex == BA_H_BANK && bankEntity->spawned )
- {
- VectorSubtract( ent->s.pos.trBase, bankEntity->s.origin, distance );
- if( VectorLength( distance ) <= 100 )
- nearBank = qtrue;
- }
- }
-
- if( !Q_stricmp( s, "all" ) )
- amount = (short)ent->client->ps.persistant[ PERS_CREDIT ];
- else
- amount = atoi( s );
-
- //no Bank nearby
- if( !nearBank )
- {
- trap_SendServerCommand( ent-g_entities, va( "print \"You must be near an Bank\n\"" ) );
- return;
- }
-
- G_LogPrintf( "Client %d depositing %d with credit %d\n",
- ent->client->ps.clientNum,
- amount,
- (short)ent->client->ps.persistant[ PERS_CREDIT ] );
-
- if( amount <= (short)ent->client->ps.persistant[ PERS_CREDIT ] )
- {
- ent->client->ps.persistant[ PERS_CREDIT ] -= (short)amount;
- ent->client->ps.persistant[ PERS_BANK ] += amount;
- level.bankCredits[ ent->client->ps.clientNum ] += amount;
- }
- else
- G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS );
- }
- else
- trap_SendServerCommand( ent-g_entities, va( "print \"Aliens have no bank\n\"" ) );
-}
-
-
-/*
-=================
-Cmd_Withdraw_f
-=================
-*/
-void Cmd_Withdraw_f( gentity_t *ent )
-{
- char s[ MAX_TOKEN_CHARS ];
- int amount;
- vec3_t distance;
- int i;
- gentity_t *bankEntity;
- qboolean nearBank = qfalse;
-
- trap_Argv( 1, s, sizeof( s ) );
-
- if( ent->client->pers.teamSelection == PTE_HUMANS )
- {
- for ( i = 1, bankEntity = g_entities + i; i < level.num_entities; i++, bankEntity++ )
- {
- if( bankEntity->s.eType != ET_BUILDABLE )
- continue;
-
- if( bankEntity->s.modelindex == BA_H_BANK && bankEntity->spawned )
- {
- VectorSubtract( ent->s.pos.trBase, bankEntity->s.origin, distance );
- if( VectorLength( distance ) <= 100 )
- nearBank = qtrue;
- }
- }
-
- if( !Q_stricmp( s, "all" ) )
- amount = level.bankCredits[ ent->client->ps.clientNum ];
- else
- amount = atoi( s );
-
- //no Bank nearby
- if( !nearBank )
- {
- trap_SendServerCommand( ent-g_entities, va( "print \"You must be near an Bank\n\"" ) );
- return;
- }
-
- G_LogPrintf( "Client %d withdrawing %d with credit %d\n",
- ent->client->ps.clientNum,
- amount,
- (short)level.bankCredits[ ent->client->ps.clientNum ] );
-
- if( amount <= level.bankCredits[ ent->client->ps.clientNum ] )
- {
- ent->client->ps.persistant[ PERS_CREDIT ] += (short)amount;
- ent->client->ps.persistant[ PERS_BANK ] -= amount;
- level.bankCredits[ ent->client->ps.clientNum ] -= amount;
- }
- else
- G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS );
- }
- else
- trap_SendServerCommand( ent-g_entities, va( "print \"Aliens have no bank\n\"" ) );
-}
-
/*
=================
@@ -1927,10 +1804,6 @@ void ClientCommand( int clientNum )
Cmd_Buy_f( ent );
else if( Q_stricmp( cmd, "sell" ) == 0 )
Cmd_Sell_f( ent );
- else if( Q_stricmp( cmd, "deposit" ) == 0 )
- Cmd_Deposit_f( ent );
- else if( Q_stricmp( cmd, "withdraw" ) == 0 )
- Cmd_Withdraw_f( ent );
else if( Q_stricmp( cmd, "itemact" ) == 0 )
Cmd_ActivateItem_f( ent );
else if( Q_stricmp( cmd, "itemdeact" ) == 0 )
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 3976740e..27ee0aa3 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -500,7 +500,6 @@ typedef struct
int humanBuildPointsPowered;
int bankCredits[ MAX_CLIENTS ]; //global credits storage
- int oBankCredits[ MAX_CLIENTS ]; //global credits storage
int alienKills;
int humanKills;
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 5977a7b6..b50be9d9 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -243,13 +243,6 @@
#define HOVEL_SPLASHRADIUS 200
#define HOVEL_CREEPSIZE 120
-#define OBANK_BP 80
-#define OBANK_HEALTH ABHM(100)
-#define OBANK_REGEN 10
-#define OBANK_SPLASHDAMAGE 20
-#define OBANK_SPLASHRADIUS 100
-#define OBANK_CREEPSIZE 120
-
/*
@@ -443,11 +436,6 @@
#define DC_SPLASHDAMAGE 50
#define DC_SPLASHRADIUS 100
-#define BANK_BP 80
-#define BANK_HEALTH HBHM(100)
-#define BANK_SPLASHDAMAGE 50
-#define BANK_SPLASHRADIUS 100
-
#define ARMOURY_BP 100
#define ARMOURY_HEALTH HBHM(175)
#define ARMOURY_SPLASHDAMAGE 50