diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/bg_misc.c | 70 | ||||
| -rw-r--r-- | src/game/bg_public.h | 5 | ||||
| -rw-r--r-- | src/game/g_active.c | 11 | ||||
| -rw-r--r-- | src/game/g_buildable.c | 171 | ||||
| -rw-r--r-- | src/game/g_local.h | 2 | ||||
| -rw-r--r-- | src/game/g_main.c | 1 | ||||
| -rw-r--r-- | src/game/g_missile.c | 86 | ||||
| -rw-r--r-- | src/game/g_svcmds.c | 1 | ||||
| -rw-r--r-- | src/game/g_weapon.c | 17 | ||||
| -rw-r--r-- | src/game/tremulous.h | 16 | 
10 files changed, 0 insertions, 380 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 806f3bd..0bb7bf0 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -187,41 +187,6 @@ static const buildableAttributes_t bg_buildableList[ ] =      ACIDTUBE_VALUE,        //int       value;    },    { -    BA_A_TRAPPER,          //int       buildNum; -    "trapper",             //char      *buildName; -    "Trapper",             //char      *humanName; -    "Fires a blob of adhesive spit at any non-alien in its line of " -    "sight. This hinders their movement, making them an easy target " -    "for other defensive structures or aliens.", -    "team_alien_trapper",  //char      *entityName; -    TR_GRAVITY,            //trType_t  traj; -    0.0,                   //float     bounce; -    TRAPPER_BP,            //int       buildPoints; -    STAGE_GE_2,            //int  stages -    TRAPPER_HEALTH,        //int       health; -    TRAPPER_REGEN,         //int       regenRate; -    TRAPPER_SPLASHDAMAGE,  //int       splashDamage; -    TRAPPER_SPLASHRADIUS,  //int       splashRadius; -    MOD_ASPAWN,            //int       meansOfDeath; -    TEAM_ALIENS,            //int       team; -    ( 1 << WP_ABUILD ),    //weapon_t  buildWeapon; -    BANIM_IDLE1,           //int       idleAnim; -    100,                   //int       nextthink; -    TRAPPER_BT,            //int       buildTime; -    qfalse,                //qboolean  usable; -    TRAPPER_RANGE,         //int       turretRange; -    TRAPPER_REPEAT,        //int       turretFireSpeed; -    WP_LOCKBLOB_LAUNCHER,  //weapon_t  turretProjType; -    0.0f,                  //float     minNormal; -    qtrue,                 //qboolean  invertNormal; -    qtrue,                 //qboolean  creepTest; -    TRAPPER_CREEPSIZE,     //int       creepSize; -    qfalse,                //qboolean  dccTest; -    qtrue,                 //qboolean  transparentTest; -    qfalse,                //qboolean  uniqueTest; -    TRAPPER_VALUE,         //int       value; -  }, -  {      BA_A_BOOSTER,          //int       buildNum;      "booster",             //char      *buildName;      "Booster",             //char      *humanName; @@ -3536,31 +3501,6 @@ static const weaponAttributes_t bg_weapons[ ] =      TEAM_HUMANS            //WUTeam_t  team;    },    { -    WP_LOCKBLOB_LAUNCHER, //int       weaponNum; -    0,                    //int       price; -    STAGE_GE_1,           //int  stages -    SLOT_WEAPON,          //int       slots; -    "lockblob",           //char      *weaponName; -    "Lock Blob",          //char      *humanName; -    "", -    0,                    //int       maxAmmo; -    0,                    //int       maxClips; -    qtrue,                //int       infiniteAmmo; -    qfalse,               //int       usesEnergy; -    500,                  //int       repeatRate1; -    500,                  //int       repeatRate2; -    500,                  //int       repeatRate3; -    0,                    //int       reloadTime; -    LOCKBLOB_K_SCALE,     //float     knockbackScale; -    qfalse,               //qboolean  hasAltMode; -    qfalse,               //qboolean  hasThirdMode; -    qfalse,               //qboolean  canZoom; -    90.0f,                //float     zoomFov; -    qfalse,               //qboolean  purchasable; -    qfalse,               //qboolean  longRanged; -    TEAM_ALIENS           //team_t    team; -  }, -  {      WP_HIVE,              //int       weaponNum;      0,                    //int       price;      STAGE_GE_1,           //int  stages @@ -4275,11 +4215,6 @@ void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean    else      s->eFlags &= ~EF_DEAD; -  if( ps->stats[ STAT_STATE ] & SS_BLOBLOCKED ) -    s->eFlags |= EF_BLOBLOCKED; -  else -    s->eFlags &= ~EF_BLOBLOCKED; -    if( ps->externalEvent )    {      s->event = ps->externalEvent; @@ -4381,11 +4316,6 @@ void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s    else      s->eFlags &= ~EF_DEAD; -  if( ps->stats[ STAT_STATE ] & SS_BLOBLOCKED ) -    s->eFlags |= EF_BLOBLOCKED; -  else -    s->eFlags &= ~EF_BLOBLOCKED; -    if( ps->externalEvent )    {      s->event = ps->externalEvent; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 53e73cc..e95f3cd 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -257,8 +257,6 @@ typedef enum  #define SS_WALLCLIMBING         0x00000001  #define SS_CREEPSLOWED          0x00000002  #define SS_SPEEDBOOST           0x00000004 -#define SS_GRABBED              0x00000008 -#define SS_BLOBLOCKED           0x00000010  #define SS_POISONED             0x00000020  #define SS_BOOSTED              0x00000080 @@ -325,7 +323,6 @@ typedef enum  #define EF_FIRING3          0x0800    // third fire  #define EF_MOVER_STOP       0x1000    // will push otherwise  #define EF_CONNECTION       0x4000    // draw a connection trouble sprite -#define EF_BLOBLOCKED       0x8000    // caught by a trapper  typedef enum  { @@ -369,7 +366,6 @@ typedef enum    WP_ROCKET_LAUNCHER,    WP_GRENADE,    WP_MINE, -  WP_LOCKBLOB_LAUNCHER,    WP_HIVE,    WP_TESLAGEN,    WP_MGTURRET, @@ -414,7 +410,6 @@ typedef enum    BA_A_OVERMIND,    BA_A_BARRICADE,    BA_A_ACIDTUBE, -  BA_A_TRAPPER,    BA_A_BOOSTER,    BA_A_HIVE,    BA_A_PANZER_SMALL, diff --git a/src/game/g_active.c b/src/game/g_active.c index 1a28de7..a1d7944 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1637,9 +1637,6 @@ void ClientThink_real( gentity_t *ent )      client->ps.pm_type = PM_NOCLIP;    else if( client->ps.stats[ STAT_HEALTH ] <= 0 )      client->ps.pm_type = PM_DEAD; -  else if( client->ps.stats[ STAT_STATE ] & SS_BLOBLOCKED || -           client->ps.stats[ STAT_STATE ] & SS_GRABBED ) -    client->ps.pm_type = PM_GRABBED;    else if( BG_InventoryContainsUpgrade( UP_JETPACK, client->ps.stats ) && BG_UpgradeIsActive( UP_JETPACK, client->ps.stats ) )      client->ps.pm_type = PM_JETPACK;    else if( client->ps.weapon == WP_ALEVEL5 && G_Overmind() ) @@ -1648,14 +1645,6 @@ void ClientThink_real( gentity_t *ent )    else      client->ps.pm_type = PM_NORMAL; -  if( ( client->ps.stats[ STAT_STATE ] & SS_GRABBED ) && -      client->grabExpiryTime < level.time ) -    client->ps.stats[ STAT_STATE ] &= ~SS_GRABBED; - -  if( ( client->ps.stats[ STAT_STATE ] & SS_BLOBLOCKED ) && -      client->lastLockTime + LOCKBLOB_LOCKTIME < level.time ) -    client->ps.stats[ STAT_STATE ] &= ~SS_BLOBLOCKED; -    if( ( client->ps.stats[ STAT_STATE ] & SS_SLOWLOCKED ) &&        client->lastSlowTime + ABUILDER_BLOB_TIME < level.time )      client->ps.stats[ STAT_STATE ] &= ~SS_SLOWLOCKED; diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 472c70f..41ff4bc 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2022,170 +2022,6 @@ void HNone_Think( gentity_t *self )    self->nextthink = level.time + 1000;  } -/* -================ -ATrapper_FireOnEnemy - -Used by ATrapper_Think to fire at enemy -================ -*/ -void ATrapper_FireOnEnemy( gentity_t *self, int firespeed, float range ) -{ -  gentity_t *enemy = self->enemy; -  vec3_t    dirToTarget; -  vec3_t    halfAcceleration, thirdJerk; -  float     distanceToTarget = BG_Buildable( self->s.modelindex )->turretRange; -  int       lowMsec = 0; -  int       highMsec = (int)( ( -    ( ( distanceToTarget * LOCKBLOB_SPEED ) + -      ( distanceToTarget * BG_Class( enemy->client->ps.stats[ STAT_CLASS ] )->speed ) ) / -    ( LOCKBLOB_SPEED * LOCKBLOB_SPEED ) ) * 1000.0f ); - -  VectorScale( enemy->acceleration, 1.0f / 2.0f, halfAcceleration ); -  VectorScale( enemy->jerk, 1.0f / 3.0f, thirdJerk ); - -  // highMsec and lowMsec can only move toward -  // one another, so the loop must terminate -  while( highMsec - lowMsec > TRAPPER_ACCURACY ) -  { -    int   partitionMsec = ( highMsec + lowMsec ) / 2; -    float time = (float)partitionMsec / 1000.0f; -    float projectileDistance = LOCKBLOB_SPEED * time; - -    VectorMA( enemy->s.pos.trBase, time, enemy->s.pos.trDelta, dirToTarget ); -    VectorMA( dirToTarget, time * time, halfAcceleration, dirToTarget ); -    VectorMA( dirToTarget, time * time * time, thirdJerk, dirToTarget ); -    VectorSubtract( dirToTarget, self->s.pos.trBase, dirToTarget ); -    distanceToTarget = VectorLength( dirToTarget ); - -    if( projectileDistance < distanceToTarget ) -      lowMsec = partitionMsec; -    else if( projectileDistance > distanceToTarget ) -      highMsec = partitionMsec; -    else if( projectileDistance == distanceToTarget ) -      break; // unlikely to happen -  } - -  VectorNormalize( dirToTarget ); -  vectoangles( dirToTarget, self->turretAim ); - -  //fire at target -  FireWeapon( self ); -  G_SetBuildableAnim( self, BANIM_ATTACK1, qfalse ); -  self->count = level.time + firespeed; -} - -/* -================ -ATrapper_CheckTarget - -Used by ATrapper_Think to check enemies for validity -================ -*/ -qboolean ATrapper_CheckTarget( gentity_t *self, gentity_t *target, int range ) -{ -  vec3_t    distance; -  trace_t   trace; - -  if( !target ) // Do we have a target? -    return qfalse; -  if( !target->inuse ) // Does the target still exist? -    return qfalse; -  if( target == self ) // is the target us? -    return qfalse; -  if( !target->client ) // is the target a bot or player? -    return qfalse; -  if( target->flags & FL_NOTARGET ) // is the target cheating? -    return qfalse; -  if( target->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) // one of us? -    return qfalse; -  if( target->client->sess.spectatorState != SPECTATOR_NOT ) // is the target alive? -    return qfalse; -  if( target->health <= 0 ) // is the target still alive? -    return qfalse; -  if( target->client->ps.stats[ STAT_STATE ] & SS_BLOBLOCKED ) // locked? -    return qfalse; -  if( target->client->notrackEndTime >= level.time) -    return qfalse; - -  VectorSubtract( target->r.currentOrigin, self->r.currentOrigin, distance ); -  if( VectorLength( distance ) > range ) // is the target within range? -    return qfalse; - -  //only allow a narrow field of "vision" -  VectorNormalize( distance ); //is now direction of target -  if( DotProduct( distance, self->s.origin2 ) < LOCKBLOB_DOT ) -    return qfalse; - -  trap_Trace( &trace, self->s.pos.trBase, NULL, NULL, target->s.pos.trBase, self->s.number, MASK_SHOT ); -  if ( trace.contents & CONTENTS_SOLID ) // can we see the target? -    return qfalse; - -  return qtrue; -} - -/* -================ -ATrapper_FindEnemy - -Used by ATrapper_Think to locate enemy gentities -================ -*/ -void ATrapper_FindEnemy( gentity_t *ent, int range ) -{ -  gentity_t *target; -  int       i; -  int       start; - -  // iterate through entities -  // note that if we exist then level.num_entities != 0 -  start = rand( ) / ( RAND_MAX / level.num_entities + 1 ); -  for( i = start; i < level.num_entities + start; i++ ) -  { -    target = g_entities + ( i % level.num_entities ); -    //if target is not valid keep searching -    if( !ATrapper_CheckTarget( ent, target, range ) ) -      continue; - -    //we found a target -    ent->enemy = target; -    return; -  } - -  //couldn't find a target -  ent->enemy = NULL; -} - -/* -================ -ATrapper_Think - -think function for Alien Defense -================ -*/ -void ATrapper_Think( gentity_t *self ) -{ -  int range =     BG_Buildable( self->s.modelindex )->turretRange; -  int firespeed = BG_Buildable( self->s.modelindex )->turretFireSpeed; - -  AGeneric_Think( self ); - -  if( self->spawned && self->powered ) -  { -    //if the current target is not valid find a new one -    if( !ATrapper_CheckTarget( self, self->enemy, range ) ) -      ATrapper_FindEnemy( self, range ); - -    //if a new target cannot be found don't do anything -    if( !self->enemy ) -      return; - -    //if we are pointing at our target and we can fire shoot it -    if( self->count < level.time ) -      ATrapper_FireOnEnemy( self, firespeed, range ); -  } -} -  qboolean CheckGatherer( gentity_t *self )  {    // suicide if there is another refinery/creep colony of the same team nearby @@ -3569,7 +3405,6 @@ static int G_CompareBuildablesForRemoval( const void *a, const void *b )      BA_A_BARRICADE,      BA_A_ACIDTUBE, -    BA_A_TRAPPER,      BA_A_HIVE,      BA_A_BOOSTER,      BA_A_SPAWN, @@ -4450,12 +4285,6 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable,        built->pain = AHive_Pain;        break; -    case BA_A_TRAPPER: -      built->die = AGeneric_Die; -      built->think = ATrapper_Think; -      built->pain = AGeneric_Pain; -      break; -      case BA_A_OVERMIND:        built->die = AGeneric_Die;        built->think = AOvermind_Think; diff --git a/src/game/g_local.h b/src/game/g_local.h index 925359c..e081579 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -1023,8 +1023,6 @@ gentity_t *fire_flamer( gentity_t *self, vec3_t start, vec3_t aimdir );  gentity_t *fire_blaster( gentity_t *self, vec3_t start, vec3_t dir );  gentity_t *fire_pulseRifle( gentity_t *self, vec3_t start, vec3_t dir );  gentity_t *fire_luciferCannon( gentity_t *self, vec3_t start, vec3_t dir, int damage, int radius, int speed ); -gentity_t *fire_lockblob( gentity_t *self, vec3_t start, vec3_t dir ); -gentity_t *fire_paraLockBlob( gentity_t *self, vec3_t start, vec3_t dir );  gentity_t *fire_slowBlob( gentity_t *self, vec3_t start, vec3_t dir );  gentity_t *fire_bounceBall( gentity_t *self, vec3_t start, vec3_t dir );  gentity_t *fire_bounceBall2( gentity_t *self, vec3_t start, vec3_t dir, int weapon, int dmg, int mod, int speed, int radius ); diff --git a/src/game/g_main.c b/src/game/g_main.c index 26a4537..cd66933 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2669,7 +2669,6 @@ void G_ArmageddonStep( void )      case BA_H_ARMOURY:      case BA_H_REPEATER:        continue; //dont get killed -    case BA_A_TRAPPER:      case BA_H_MGTURRET:      case BA_H_MGTURRET2:      case BA_H_LIGHT: diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 071d26d..4bdd43f 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -101,9 +101,6 @@ void G_ExplodeMissile( gentity_t *ent )    ent->s.eType = ET_GENERAL; -  if( ent->s.weapon != WP_LOCKBLOB_LAUNCHER ) -    G_AddEvent( ent, EV_MISSILE_MISS, DirToByte( dir ) ); -    ent->freeAfterEvent = qtrue;    // splash damage @@ -160,16 +157,6 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace )      return;    } -  else if( !strcmp( ent->classname, "lockblob" ) ) -  { -    if( other->client && other->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) -    { -      other->client->ps.stats[ STAT_STATE ] |= SS_BLOBLOCKED; -      other->client->lastLockTime = level.time; -      AngleVectors( other->client->ps.viewangles, dir, NULL, NULL ); -      other->client->ps.stats[ STAT_VIEWLOCK ] = DirToByte( dir ); -    } -  }    else if( !strcmp( ent->classname, "slowblob" ) )    {      if( other->client && other->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) @@ -1451,43 +1438,6 @@ gentity_t *fire_hive( gentity_t *self, vec3_t start, vec3_t dir )  /*  ================= -fire_lockblob -================= -*/ -gentity_t *fire_lockblob( gentity_t *self, vec3_t start, vec3_t dir ) -{ -  gentity_t *bolt; - -  VectorNormalize ( dir ); -  bolt = G_Spawn( ); -  bolt->classname = "lockblob"; -  bolt->pointAgainstWorld = qtrue; -  bolt->nextthink = level.time + 15000; -  bolt->think = G_ExplodeMissile; -  bolt->s.eType = ET_MISSILE; -  bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; -  bolt->s.weapon = WP_LOCKBLOB_LAUNCHER; -  bolt->s.generic1 = WPM_PRIMARY; //weaponMode -  bolt->r.ownerNum = self->s.number; -  bolt->parent = self; -  bolt->damage = 0; -  bolt->splashDamage = 0; -  bolt->splashRadius = 0; -  bolt->methodOfDeath = MOD_UNKNOWN; //doesn't do damage so will never kill -  bolt->clipmask = MASK_SHOT; -  bolt->target_ent = NULL; -  bolt->s.pos.trType = TR_LINEAR; -  bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME;   // move a bit on the very first frame -  VectorCopy( start, bolt->s.pos.trBase ); -  VectorScale( dir, 500, bolt->s.pos.trDelta ); -  SnapVector( bolt->s.pos.trDelta );      // save net bandwidth -  VectorCopy( start, bolt->r.currentOrigin ); - -  return bolt; -} - -/* -=================  fire_slowBlob  =================  */ @@ -1571,42 +1521,6 @@ gentity_t *launch_mine( gentity_t *self, vec3_t start, vec3_t dir )    return bolt;  } - -/* -================= -fire_paraLockBlob -================= -*/ -gentity_t *fire_paraLockBlob( gentity_t *self, vec3_t start, vec3_t dir ) -{ -  gentity_t *bolt; -  VectorNormalize ( dir ); -  bolt = G_Spawn( ); -  bolt->classname = "lockblob"; -  bolt->pointAgainstWorld = qtrue; -  bolt->nextthink = level.time + 15000; -  bolt->think = G_ExplodeMissile; -  bolt->s.eType = ET_MISSILE; -  bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; -  bolt->s.weapon = WP_LOCKBLOB_LAUNCHER; -  bolt->s.generic1 = self->s.generic1; //weaponMode -  bolt->r.ownerNum = self->s.number; -  bolt->parent = self; -  bolt->damage = 0; -  bolt->splashDamage = 0; -  bolt->splashRadius = 0; -  bolt->clipmask = MASK_SHOT; -  bolt->target_ent = NULL; -  bolt->s.pos.trType = TR_GRAVITY; -  bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME;   // move a bit on the very first frame -  VectorCopy( start, bolt->s.pos.trBase ); -  VectorScale( dir, LOCKBLOB_SPEED, bolt->s.pos.trDelta ); -  SnapVector( bolt->s.pos.trDelta );      // save net bandwidth -  VectorCopy( start, bolt->r.currentOrigin ); - -  return bolt; -} -  /*  =================  Prickles_Fire diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index c9dd825..7e29c8e 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -587,7 +587,6 @@ static void Svcmd_Armageddon_f( void )      switch( ent->s.modelindex )      { -      case BA_A_TRAPPER:        case BA_H_MGTURRET:        case BA_H_MGTURRET2:  	  case BA_A_ACIDTUBE: diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index b3a9440..705678d 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -526,20 +526,6 @@ void massDriverFire2( gentity_t *ent )    fire_md2( ent, origin, forward );  } - -/* -====================================================================== - -LOCKBLOB - -====================================================================== -*/ - -void lockBlobLauncherFire( gentity_t *ent ) -{ -  fire_lockblob( ent, muzzle, forward ); -} -  /*  ====================================================================== @@ -1875,9 +1861,6 @@ void FireWeapon( gentity_t *ent )      case WP_MINE:        throwMine( ent );        break; -    case WP_LOCKBLOB_LAUNCHER: -      lockBlobLauncherFire( ent ); -      break;      case WP_HIVE:        hiveFire( ent );        break; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 7028ae7..6d48530 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -629,22 +629,6 @@ TREMULOUS EDGE MOD SRC FILE  #define HIVE_DIR_CHANGE_PERIOD      400  #define HIVE_VALUE                  ABVM(HIVE_BP) -#define TRAPPER_BP                  4 -#define TRAPPER_BT                  5000 -#define TRAPPER_HEALTH              ABHM(100) -#define TRAPPER_REGEN               6 -#define TRAPPER_SPLASHDAMAGE        15 -#define TRAPPER_SPLASHRADIUS        100 -#define TRAPPER_CREEPSIZE           25 -#define TRAPPER_RANGE               400 -#define TRAPPER_REPEAT              1000 -#define TRAPPER_VALUE               ABVM(TRAPPER_BP) -#define LOCKBLOB_SPEED              650.0f -#define LOCKBLOB_LOCKTIME           5000 -#define LOCKBLOB_DOT                0.85f // max angle = acos( LOCKBLOB_DOT ) -#define LOCKBLOB_K_SCALE            1.0f -#define TRAPPER_ACCURACY            9 // lower is better -  #define OVERMIND_BP                 0  #define OVERMIND_BT                 30000  #define OVERMIND_HEALTH             ABHM(750)  | 
