o Lerk health 125 -> 150

o Lerk Armour 30 - 50
o Lerk base flight speed cap is now 700, adjust +25 per celerity level.  No more pancaking.
o Lerk climb slower depending on angle of ascent.  10% reduction at vertical climb
o Lerk dive faster depending on angle of descent.  10% increase at vertical vertical
o Lerk flap costs zero energy.

o Commanders now see alien health rings




git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@363 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2005-11-25 03:48:31 +00:00
parent e09645fa6f
commit 0d639b1476
3 changed files with 90 additions and 75 deletions

View file

@ -173,11 +173,11 @@
#define kKillRewardMin 1 #define kKillRewardMin 1
#define kLeapDamage 80 #define kLeapDamage 80
#define kLerkArmorUpgrade 30 #define kLerkArmorUpgrade 30
#define kLerkBaseArmor 30 #define kLerkBaseArmor 50
#define kLerkBaseSpeed 175 #define kLerkBaseSpeed 175
#define kLerkCost 30 #define kLerkCost 30
#define kLerkGestateTime 15 #define kLerkGestateTime 15
#define kLerkHealth 125 #define kLerkHealth 150
#define kMGDamage 10 #define kMGDamage 10
#define kMGMaxAmmo 250 #define kMGMaxAmmo 250
#define kMGMaxClip 50 #define kMGMaxClip 50
@ -405,7 +405,7 @@
#define kJoinTeamCooldown 3.00 #define kJoinTeamCooldown 3.00
#define kKNROF 0.65 #define kKNROF 0.65
#define kLeapEnergyCost 0.25 #define kLeapEnergyCost 0.25
#define kLerkBaseAscendSpeedMax 600.00 #define kLerkBaseFlightSpeedMax 700.00
#define kMGROF 0.10 #define kMGROF 0.10
#define kMarineArmorLevelOne 0.20 #define kMarineArmorLevelOne 0.20
#define kMarineArmorLevelThree 0.60 #define kMarineArmorLevelThree 0.60

View file

@ -2461,7 +2461,7 @@ void AvHHud::DrawBuildHealthEffectsForEntity(int inEntityIndex, float inAlpha)
theMaxs = theEntity->curstate.maxs; theMaxs = theEntity->curstate.maxs;
theHealthPercentage = theEntity->curstate.fuser2/kNormalizationNetworkFactor; theHealthPercentage = theEntity->curstate.fuser2/kNormalizationNetworkFactor;
// puzl: 991 transmit armour and health for marines // puzl: 991 transmit armour and health for marines
if ( GetIsMarine() && theEntityIsPlayer ) { if ( GetIsMarine() && theEntityIsPlayer && theIsOnOurTeam ) {
int tmpPercent=theEntity->curstate.fuser2; int tmpPercent=theEntity->curstate.fuser2;
if ( GetInTopDownMode() ) { if ( GetInTopDownMode() ) {
theHealthPercentage = (float)(tmpPercent&0x7F)/100; theHealthPercentage = (float)(tmpPercent&0x7F)/100;
@ -2796,9 +2796,10 @@ void AvHHud::RenderCommonUI()
if (gHUD.GetServerVariableFloat("sv_cheats") != 0 && CVAR_GET_FLOAT("cl_showspeed") != 0) if (gHUD.GetServerVariableFloat("sv_cheats") != 0 && CVAR_GET_FLOAT("cl_showspeed") != 0)
{ {
// Draw the speedometer. // Draw the speedometer.
static int maxVelocity=0, maxClimb=0, maxDive=0;
int theR, theG, theB; int theR, theG, theB;
this->GetPrimaryHudColor(theR, theG, theB, true, false); this->GetPrimaryHudColor(theR, theG, theB, true, false);
@ -2806,7 +2807,13 @@ void AvHHud::RenderCommonUI()
char buffer[1024]; char buffer[1024];
sprintf(buffer, "Speed = %d", (int)Length(pmove->velocity)); int velocity=(int)Length(pmove->velocity);
maxVelocity=max(maxVelocity, velocity);
maxClimb=max((int)pmove->velocity[2], maxClimb);
maxDive=min((int)pmove->velocity[2], maxDive);
sprintf(buffer, "Speed(Max)= %d (%d)", velocity, maxVelocity);
mFont.DrawString(10, 10, buffer, theR, theG, theB); mFont.DrawString(10, 10, buffer, theR, theG, theB);
float theGroundSpeed = sqrtf(pmove->velocity[0] * pmove->velocity[0] + pmove->velocity[1] * pmove->velocity[1]); float theGroundSpeed = sqrtf(pmove->velocity[0] * pmove->velocity[0] + pmove->velocity[1] * pmove->velocity[1]);
@ -2814,8 +2821,10 @@ void AvHHud::RenderCommonUI()
sprintf(buffer, "Ground speed = %d", (int)theGroundSpeed); sprintf(buffer, "Ground speed = %d", (int)theGroundSpeed);
mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB); mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB);
sprintf(buffer, "Max Ascent/Descent = %d/%d", maxClimb, maxDive);
mFont.DrawString(10, 16 + mFont.GetStringHeight()*2, buffer, theR, theG, theB);
} }
DrawInfoLocationText(); DrawInfoLocationText();
DrawHUDStructureNotification(); DrawHUDStructureNotification();

View file

@ -362,6 +362,23 @@ bool PM_GetIsCharging()
return false; return false;
} }
int PM_GetCelerityLevel() {
int theSpeedUpgradeLevel =0;
if(GetHasUpgrade(pmove->iuser4, MASK_UPGRADE_4))
{
theSpeedUpgradeLevel = 1;
if(GetHasUpgrade(pmove->iuser4, MASK_UPGRADE_12))
{
theSpeedUpgradeLevel = 2;
}
else if(GetHasUpgrade(pmove->iuser4, MASK_UPGRADE_13))
{
theSpeedUpgradeLevel = 3;
}
}
return theSpeedUpgradeLevel;
}
/* /*
=================== ===================
@ -3560,6 +3577,7 @@ void PM_AirMove (void)
PM_PreventMegaBunnyJumping(true); PM_PreventMegaBunnyJumping(true);
float theAirAccelerate = gIsJetpacking[pmove->player_index] ? pmove->movevars->airaccelerate*4 : pmove->movevars->airaccelerate; float theAirAccelerate = gIsJetpacking[pmove->player_index] ? pmove->movevars->airaccelerate*4 : pmove->movevars->airaccelerate;
if(pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3) if(pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3)
{ {
@ -4425,6 +4443,7 @@ bool PM_BlinkMove (void)
// Lerk flight // Lerk flight
bool PM_FlapMove() bool PM_FlapMove()
{ {
static float maxVelocity, maxx, maxy, maxz;
if (pmove->iuser3 != AVH_USER3_ALIEN_PLAYER3) if (pmove->iuser3 != AVH_USER3_ALIEN_PLAYER3)
return false; return false;
@ -4436,7 +4455,7 @@ bool PM_FlapMove()
// Set to define delay between flaps in seconds // Set to define delay between flaps in seconds
pmove->fuser4 = 0.1f; pmove->fuser4 = 0.1f;
AvHMUDeductAlienEnergy(pmove->fuser3, kAlienEnergyFlap); //AvHMUDeductAlienEnergy(pmove->fuser3, kAlienEnergyFlap);
// boost a bit up when on the ground // boost a bit up when on the ground
if (pmove->onground > -1) if (pmove->onground > -1)
@ -4488,36 +4507,10 @@ bool PM_FlapMove()
VectorScale(pmove->forward, theThrust, theFlapVelocity); VectorScale(pmove->forward, theThrust, theFlapVelocity);
theFlapVelocity[2] += theLift; theFlapVelocity[2] += theLift;
int theSpeedUpgradeLevel = 0;
if(GetHasUpgrade(pmove->iuser4, MASK_UPGRADE_4))
{
theSpeedUpgradeLevel = 1;
if(GetHasUpgrade(pmove->iuser4, MASK_UPGRADE_12))
{
theSpeedUpgradeLevel = 2;
}
else if(GetHasUpgrade(pmove->iuser4, MASK_UPGRADE_13))
{
theSpeedUpgradeLevel = 3;
}
}
int theAdjustment=theSpeedUpgradeLevel * BALANCE_VAR(kAlienCelerityBonus);
float theAscendMax=BALANCE_VAR(kLerkBaseAscendSpeedMax) + theAdjustment;
static float maxVelocity=0;
maxVelocity=max(maxVelocity, pmove->velocity[2]);
if ( pmove->velocity[2] > theAscendMax ) {
theFlapVelocity[2]=0;
}
// cap diving too
if ( -pmove->velocity[2] > theAscendMax*1.3 ) {
theFlapVelocity[2]=0;
}
vec3_t theNewVelocity; vec3_t theNewVelocity;
VectorAdd(pmove->velocity, theFlapVelocity, theNewVelocity); VectorAdd(pmove->velocity, theFlapVelocity, theNewVelocity);
VectorCopy(theNewVelocity, pmove->velocity); VectorCopy(theNewVelocity, pmove->velocity);
if(pmove->runfuncs) if(pmove->runfuncs)
{ {
@ -4556,8 +4549,8 @@ bool PM_FlapMove()
{ {
// Compute the velocity not in the direction we're facing. // Compute the velocity not in the direction we're facing.
float theGlideAmount = PM_GetHorizontalSpeed() / 1000; float theGlideAmount = PM_GetHorizontalSpeed() / 1000;
if (theGlideAmount > 0.2) if (theGlideAmount > 0.5)
theGlideAmount = 0.2; theGlideAmount = 0.5;
float speed = Length(pmove->velocity); float speed = Length(pmove->velocity);
float projectedSpeed = DotProduct(pmove->velocity, pmove->forward); float projectedSpeed = DotProduct(pmove->velocity, pmove->forward);
@ -5134,48 +5127,62 @@ void PM_PreventMegaBunnyJumping(bool inAir)
// If we have to crop, apply this cropping fraction to velocity // If we have to crop, apply this cropping fraction to velocity
float fraction; float fraction;
// Speed at which bunny jumping is limited // Speed at which bunny jumping is limited
float maxscaledspeed; if ( pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 && inAir ) {
float maxbasespeed=BALANCE_VAR(kLerkBaseFlightSpeedMax) + BALANCE_VAR(kAlienCelerityBonus) * PM_GetCelerityLevel();
maxscaledspeed = BUNNYJUMP_MAX_SPEED_FACTOR * pmove->maxspeed; vec3_t vertical={0,0,-1.0f};
if(inAir)
{
// Allow flyers, leapers, and JPers to go faster in the air, but still capped
maxscaledspeed = BALANCE_VAR(kAirspeedMultiplier)*pmove->maxspeed;
}
// Don't divide by zero vec3_t forward;
if ( maxscaledspeed <= 0.0f ) vec3_t tmp;
return;
vec3_t theVelVector; spd = Length( pmove->velocity );
VectorCopy(pmove->velocity, theVelVector);
if(inAir) // Simulate gravity
{ AngleVectors(pmove->angles, forward, tmp, tmp);
theVelVector[2] = 0.0f; float ascentModifier=1.0f + DotProduct(forward, vertical)/10.0f;
} maxbasespeed *= ascentModifier;
spd = Length( theVelVector ); if ( spd <= maxbasespeed )
return;
if ( spd <= maxscaledspeed ) // Returns the modifier for the velocity
return; fraction = maxbasespeed/spd;
// Returns the modifier for the velocity VectorScale( pmove->velocity, fraction, pmove->velocity ); //Crop it down!.
fraction = maxscaledspeed/spd; }
else
{
float maxscaledspeed;
float theCurrentSpeed = Length(pmove->velocity); maxscaledspeed = BUNNYJUMP_MAX_SPEED_FACTOR * pmove->maxspeed;
if(inAir)
{
// Allow flyers, leapers, and JPers to go faster in the air, but still capped
maxscaledspeed = BALANCE_VAR(kAirspeedMultiplier)*pmove->maxspeed;
}
VectorScale( pmove->velocity, fraction, pmove->velocity ); //Crop it down!. // Don't divide by zero
if ( maxscaledspeed <= 0.0f )
return;
//#ifdef AVH_CLIENT vec3_t theVelVector;
// if(pmove->runfuncs) VectorCopy(pmove->velocity, theVelVector);
// {
// pmove->Con_Printf("Preventing speed exploits (max speed: %f, current speed: %f, adjusted speed: %f\n", pmove->maxspeed, theCurrentSpeed, Length(pmove->velocity));
// }
//#endif
// Trigger footstep immediately to prevent silent bunny-hopping if(inAir)
//pmove->flTimeStepSound = 0.0f; {
theVelVector[2] = 0.0f;
}
spd = Length( theVelVector );
if ( spd <= maxscaledspeed )
return;
// Returns the modifier for the velocity
fraction = maxscaledspeed/spd;
VectorScale( pmove->velocity, fraction, pmove->velocity ); //Crop it down!.
}
} }
/* /*
@ -5267,7 +5274,6 @@ void PM_Jump (void)
// Lerk flight movement // Lerk flight movement
PM_FlapMove(); PM_FlapMove();
// tankefugl: 0000972 walljump // tankefugl: 0000972 walljump
if (canWallJump && (GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) && (pmove->cmd.buttons & IN_JUMP) && !(pmove->oldbuttons & IN_JUMP) /*&& (gSurfaceNormal[2] < 0.7)*/)) if (canWallJump && (GetHasUpgrade(pmove->iuser4, MASK_WALLSTICKING) && (pmove->cmd.buttons & IN_JUMP) && !(pmove->oldbuttons & IN_JUMP) /*&& (gSurfaceNormal[2] < 0.7)*/))
{ {