mirror of
https://github.com/ENSL/NS.git
synced 2024-11-27 06:42:54 +00:00
o Updated liblist.gam for 3.2.
o Added ns.tga for steam browser icon. o changed directory to nsp. o Added more info to cl_showspeed. o Fixed a bug where a commander could not accurately determine an alien health ring value. o Fixed pancaking - added limit to the speed at which a lerk can climb and dive. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@385 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
5c9a0aed2d
commit
c111ce76db
6 changed files with 52 additions and 43 deletions
|
@ -2,10 +2,11 @@
|
|||
// Natural Selection //
|
||||
// by Charlie Cleveland //
|
||||
////////////////////////////
|
||||
game "Natural Selection 3.1"
|
||||
game "Natural Selection 3.2"
|
||||
url_info "http://www.unknownworlds.com/ns/"
|
||||
url_dl "http://www.unknownworlds.com/ns/view?action=files"
|
||||
version "v3.1"
|
||||
icon "ns"
|
||||
version "v3.2"
|
||||
size "165000000"
|
||||
svonly "0"
|
||||
secure "0"
|
||||
|
|
BIN
releases/3.2.0/ns.tga
Normal file
BIN
releases/3.2.0/ns.tga
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
#include <cstring>
|
||||
|
||||
const int slashchr = '\\';
|
||||
#define kAvHModDir ((const char*)("ns"))
|
||||
#define kAvHModDir ((const char*)("nsp"))
|
||||
|
||||
const char* getModDirectory(void)
|
||||
{
|
||||
|
|
|
@ -2440,7 +2440,7 @@ void AvHHud::DrawBuildHealthEffectsForEntity(int inEntityIndex, float inAlpha)
|
|||
theMaxs = theEntity->curstate.maxs;
|
||||
theHealthPercentage = theEntity->curstate.fuser2/kNormalizationNetworkFactor;
|
||||
// puzl: 991 transmit armour and health for marines
|
||||
if ( GetIsMarine() && theEntityIsPlayer ) {
|
||||
if ( GetIsMarine() && theEntityIsPlayer && theIsOnOurTeam ) {
|
||||
int tmpPercent=theEntity->curstate.fuser2;
|
||||
if ( GetInTopDownMode() ) {
|
||||
theHealthPercentage = (float)(tmpPercent&0x7F)/100;
|
||||
|
@ -2777,7 +2777,7 @@ void AvHHud::RenderCommonUI()
|
|||
{
|
||||
|
||||
// Draw the speedometer.
|
||||
|
||||
static int maxSpeed=0, maxGroundSpeed=0, maxClimb=0, maxDive=0;
|
||||
int theR, theG, theB;
|
||||
this->GetPrimaryHudColor(theR, theG, theB, true, false);
|
||||
|
||||
|
@ -2785,12 +2785,18 @@ void AvHHud::RenderCommonUI()
|
|||
|
||||
char buffer[1024];
|
||||
|
||||
sprintf(buffer, "Speed = %d", (int)Length(pmove->velocity));
|
||||
maxClimb=max(maxClimb, (int)pmove->velocity[2]);
|
||||
maxDive=min(maxDive, (int)pmove->velocity[2]);
|
||||
|
||||
int speed=(int)Length(pmove->velocity);
|
||||
|
||||
maxSpeed=max(speed, maxSpeed);
|
||||
sprintf(buffer, "Speed = %d (%d) %d/%d", speed, maxSpeed, maxClimb, maxDive);
|
||||
mFont.DrawString(10, 10, buffer, theR, theG, theB);
|
||||
|
||||
float theGroundSpeed = sqrtf(pmove->velocity[0] * pmove->velocity[0] + pmove->velocity[1] * pmove->velocity[1]);
|
||||
|
||||
sprintf(buffer, "Ground speed = %d", (int)theGroundSpeed);
|
||||
maxGroundSpeed=max(theGroundSpeed, maxGroundSpeed);
|
||||
sprintf(buffer, "Ground speed = %d (%d)", (int)theGroundSpeed, maxGroundSpeed);
|
||||
mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB);
|
||||
|
||||
|
||||
|
|
|
@ -4868,6 +4868,37 @@ void PM_PlaybackEvent(int inEventID)
|
|||
pmove->PM_PlaybackEventFull(theFlags, thisPredictedPlayer, inEventID, 0, (float *)theZeroVector, (float *)theZeroVector, 0.0, 0.0, /*theWeaponIndex*/ 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
#define LERK_DIVE_FACTOR -1.3f
|
||||
|
||||
// Comment: Respect to the valve function name below
|
||||
// Prevent lerks from having extreme vertical velocities
|
||||
void PM_PreventMegaCrazyLerkPancakage() {
|
||||
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) + (float)theAdjustment;
|
||||
float theDescendMax=theAscendMax*LERK_DIVE_FACTOR;
|
||||
if ( pmove->velocity[2] > theAscendMax ) {
|
||||
pmove->velocity[2]=theAscendMax;
|
||||
}
|
||||
// cap diving too
|
||||
else if ( pmove->velocity[2] < theDescendMax ) {
|
||||
pmove->velocity[2]=theDescendMax;
|
||||
}
|
||||
}
|
||||
|
||||
// Only allow bunny jumping up to 1.1x server / player maxspeed setting
|
||||
#define BUNNYJUMP_MAX_SPEED_FACTOR 1.7f
|
||||
|
||||
|
@ -4889,6 +4920,10 @@ void PM_PreventMegaBunnyJumping(bool inAir)
|
|||
maxscaledspeed = BUNNYJUMP_MAX_SPEED_FACTOR * pmove->maxspeed;
|
||||
if(inAir)
|
||||
{
|
||||
// prevent pancaking
|
||||
if ( pmove->iuser3 == AVH_USER3_ALIEN_PLAYER3 ) {
|
||||
PM_PreventMegaCrazyLerkPancakage();
|
||||
}
|
||||
// Allow flyers, leapers, and JPers to go faster in the air, but still capped
|
||||
maxscaledspeed = BALANCE_VAR(kAirspeedMultiplier)*pmove->maxspeed;
|
||||
}
|
||||
|
@ -5075,35 +5110,8 @@ void PM_Jump (void)
|
|||
VectorScale(pmove->forward, theThrust, theFlapVelocity);
|
||||
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;
|
||||
VectorAdd(pmove->velocity, theFlapVelocity, theNewVelocity);
|
||||
|
||||
VectorCopy(theNewVelocity, pmove->velocity);
|
||||
/*
|
||||
|
||||
|
@ -5181,15 +5189,9 @@ void PM_Jump (void)
|
|||
|
||||
// Compute the velocity not in the direction we're facing.
|
||||
|
||||
float theGlideAmount = PM_GetHorizontalSpeed() / 1000;
|
||||
|
||||
if (theGlideAmount > 0.2)
|
||||
{
|
||||
theGlideAmount = 0.2;
|
||||
}
|
||||
float theGlideAmount = min(0.2f, PM_GetHorizontalSpeed() / 1000);
|
||||
|
||||
|
||||
float speed = Length(pmove->velocity);
|
||||
float speed = Length(pmove->velocity);
|
||||
float projectedSpeed = DotProduct(pmove->velocity, pmove->forward);
|
||||
|
||||
// tankefugl: 0000522 reverse lerk flight
|
||||
|
|
Loading…
Reference in a new issue