From 43763238a0187c885482283c8d7e5ae0137423b5 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Mon, 22 Jun 2015 15:59:40 +0200 Subject: Remove Cloak. --- assets/icons/iconu_cloak.tga | Bin 16688 -> 0 bytes src/game/bg_misc.c | 16 ---------------- src/game/bg_public.h | 1 - src/game/g_active.c | 24 ------------------------ src/game/g_cmds.c | 20 -------------------- src/game/g_combat.c | 6 ------ src/game/g_local.h | 9 --------- 7 files changed, 76 deletions(-) delete mode 100644 assets/icons/iconu_cloak.tga diff --git a/assets/icons/iconu_cloak.tga b/assets/icons/iconu_cloak.tga deleted file mode 100644 index d5bdb17..0000000 Binary files a/assets/icons/iconu_cloak.tga and /dev/null differ diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 0bb7bf0..8a993aa 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -3758,22 +3758,6 @@ static const upgradeAttributes_t bg_upgrades[ ] = qfalse, //qboolean usable TEAM_HUMANS //team_t team; }, - { - UP_CLOAK, //int upgradeNum; - CLOAK_PRICE, //int price; - STAGE_GE_4, //int stages - SLOT_NONE, //int slots; - "cloak", //char *upgradeName; - "[yecloa]Cloak", //char *humanName; - "Invisibility cloak that can be used to sneak up on aliens " - "without being seen. The cloak lasts for 30 seconds once it " - "is activated. Back-mounted battery pack and jet pack will " - "stay visible.", - "icons/iconu_cloak", - qtrue, //qboolean purchasable - qtrue, //qboolean usable - TEAM_HUMANS //team_t team; - }, { UP_BATTPACK, //int upgradeNum; BATTPACK_PRICE, //int price; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index e95f3cd..99bba40 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -382,7 +382,6 @@ typedef enum UP_HELMET, UP_MEDKIT, UP_BIOKIT, - UP_CLOAK, UP_BATTPACK, UP_JETPACK, UP_BATTLESUIT, diff --git a/src/game/g_active.c b/src/game/g_active.c index a1d7944..270b179 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -839,15 +839,6 @@ void ClientTimerActions( gentity_t *ent, int msec ) client->ps.stats[ STAT_MISC ] = 0; } - if( ent->client->cloakActivated ) - { - if( !( ent->client->cloakReady ) ) - { - if( level.time - ent->client->lastCloakTime > CLOAK_TIME || ent->health <= 0 ) - ent->client->ps.eFlags &= ~EF_MOVER_STOP; - } - } - switch( weapon ) { case WP_ABUILD: @@ -1669,21 +1660,6 @@ void ClientThink_real( gentity_t *ent ) BG_UpgradeIsActive( UP_MEDKIT, client->ps.stats ) ) G_UseMedkit( ent ); - if( BG_InventoryContainsUpgrade( UP_CLOAK, client->ps.stats ) && - BG_UpgradeIsActive( UP_CLOAK, client->ps.stats ) ) - { - if( ent->client->cloakReady ) - { - BG_DeactivateUpgrade( UP_CLOAK, client->ps.stats ); - BG_RemoveUpgradeFromInventory( UP_CLOAK, client->ps.stats ); - ent->client->cloakActivated = qtrue; - ent->client->cloakReady = qfalse; - ent->client->lastCloakTime = level.time; - ent->client->ps.eFlags |= EF_MOVER_STOP; - } - } - - // Replenish alien health if( level.surrenderTeam != client->pers.teamSelection && ent->nextRegenTime >= 0 && ent->nextRegenTime < level.time ) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 33fff3f..ab26900 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -318,8 +318,6 @@ void ScoreboardMessage( gentity_t *ent ) upgrade = UP_LIGHTARMOUR; else if( BG_InventoryContainsUpgrade( UP_BIOKIT, cl->ps.stats ) ) upgrade = UP_BIOKIT; - else if( BG_InventoryContainsUpgrade( UP_CLOAK, cl->ps.stats ) ) - upgrade = UP_CLOAK; else upgrade = UP_NONE; } @@ -2254,12 +2252,6 @@ void Cmd_Buy_f( gentity_t *ent ) if( upgrade == UP_BATTPACK ) G_GiveClientMaxAmmo( ent, qtrue ); - if( upgrade == UP_CLOAK ) - { - ent->client->cloakReady = qtrue; - ent->client->ps.eFlags &= ~EF_MOVER_STOP; - } - //subtract from funds G_AddCreditToClient( ent->client, -(short)BG_Upgrade( upgrade )->price, qfalse ); } @@ -2368,12 +2360,6 @@ void Cmd_Sell_f( gentity_t *ent ) if( upgrade == UP_BATTPACK ) G_GiveClientMaxAmmo( ent, qtrue ); - - if( upgrade == UP_CLOAK ) - { - ent->client->cloakReady = qfalse; - ent->client->ps.eFlags &= ~EF_MOVER_STOP; - } //add to funds G_AddCreditToClient( ent->client, (short)BG_Upgrade( upgrade )->price, qfalse ); } @@ -2438,12 +2424,6 @@ void Cmd_Sell_f( gentity_t *ent ) if( i == UP_BATTPACK ) G_GiveClientMaxAmmo( ent, qtrue ); - if( i == UP_CLOAK ) - { - ent->client->cloakReady = qfalse; - ent->client->ps.eFlags &= ~EF_MOVER_STOP; - } - //add to funds G_AddCreditToClient( ent->client, (short)BG_Upgrade( i )->price, qfalse ); } diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 03b8d82..52b669b 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1483,12 +1483,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, if( targ->client ) { targ->client->ps.stats[ STAT_HEALTH ] = targ->health; - - //turn off cloak if it is already activated and if the target is damaged - if( targ->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS && - targ->client->cloakActivated && - !targ->client->cloakReady ) - targ->client->ps.eFlags &= ~EF_MOVER_STOP; } } diff --git a/src/game/g_local.h b/src/game/g_local.h index e081579..a68fe83 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -486,18 +486,9 @@ struct gclient_s int medKitIncrementTime; int lastCreepSlowTime; // time until creep can be removed - // cloak - int lastCloakTime; - qboolean cloakActivated; - qboolean cloakReady; - // biokit qboolean alreadyRegenerated; - // infection - int lastInfectionTime; - gentity_t *lastInfectionClient; - qboolean charging; int lastFlameBall; // s.number of the last flame ball fired -- cgit