diff --git a/releases/3.2.0/cl_dlls/client.dll b/releases/3.2.0/cl_dlls/client.dll index 7ee21a11..d6380e6f 100644 Binary files a/releases/3.2.0/cl_dlls/client.dll and b/releases/3.2.0/cl_dlls/client.dll differ diff --git a/releases/3.2.0/dlls/ns.dll b/releases/3.2.0/dlls/ns.dll index 996d6a15..260adec4 100644 Binary files a/releases/3.2.0/dlls/ns.dll and b/releases/3.2.0/dlls/ns.dll differ diff --git a/releases/3.2.0/liblist.gam b/releases/3.2.0/liblist.gam index 42808b46..39246098 100644 --- a/releases/3.2.0/liblist.gam +++ b/releases/3.2.0/liblist.gam @@ -2,7 +2,7 @@ // Natural Selection // // by Charlie Cleveland // //////////////////////////// -game "Natural Selection 3.2 (Revision 537)" +game "Natural Selection 3.2 (Revision 538)" url_info "http://www.unknownworlds.com/ns/" url_dl "http://www.unknownworlds.com/ns/view?action=files" icon "ns" diff --git a/releases/3.2.0/source/mod/AvHHudRender.cpp b/releases/3.2.0/source/mod/AvHHudRender.cpp index 1e0c5db4..728b8070 100644 --- a/releases/3.2.0/source/mod/AvHHudRender.cpp +++ b/releases/3.2.0/source/mod/AvHHudRender.cpp @@ -2778,37 +2778,47 @@ void AvHHud::Render() void AvHHud::RenderCommonUI() { + static bool speedMeasured=false; if (!mSteamUIActive) { - if (gHUD.GetServerVariableFloat("sv_cheats") != 0 && CVAR_GET_FLOAT("cl_showspeed") != 0) - { - - // Draw the speedometer. + if (gHUD.GetServerVariableFloat("sv_cheats") != 0 ) { static int maxSpeed=0, maxGroundSpeed=0, maxClimb=0, maxDive=0; - int theR, theG, theB; - this->GetPrimaryHudColor(theR, theG, theB, true, false); + if ( CVAR_GET_FLOAT("cl_showspeed") != 0) { - extern playermove_s* pmove; - - char buffer[1024]; + // Draw the speedometer. + int theR, theG, theB; + this->GetPrimaryHudColor(theR, theG, theB, true, false); - maxClimb=max(maxClimb, (int)pmove->velocity[2]); - maxDive=min(maxDive, (int)pmove->velocity[2]); + extern playermove_s* pmove; + + char buffer[1024]; - int speed=(int)Length(pmove->velocity); + maxClimb=max(maxClimb, (int)pmove->velocity[2]); + maxDive=min(maxDive, (int)pmove->velocity[2]); - maxSpeed=max(speed, maxSpeed); - sprintf(buffer, "Speed = %d (%d) %d/%d", speed, maxSpeed, maxClimb, maxDive); - mFont.DrawString(10, 10, buffer, theR, theG, theB); + int speed=(int)Length(pmove->velocity); - float theGroundSpeed = sqrtf(pmove->velocity[0] * pmove->velocity[0] + pmove->velocity[1] * pmove->velocity[1]); - maxGroundSpeed=max(theGroundSpeed, maxGroundSpeed); - sprintf(buffer, "Ground speed = %d (%d)", (int)theGroundSpeed, maxGroundSpeed); - mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB); - + 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]); + maxGroundSpeed=max(theGroundSpeed, maxGroundSpeed); + sprintf(buffer, "Ground speed = %d (%d)", (int)theGroundSpeed, maxGroundSpeed); + mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB); + speedMeasured = true; + } + else if ( speedMeasured == true ) { + char msg[256]; + sprintf(msg, "Current Speed(%d)\tCurrent Ground Speed(%d) Max Speed(%d)\t Max Ground Speed (%d)\tMax Climb (%d)\tMax Dive(%d)\n", + (int)Length(pmove->velocity), (int)sqrtf(pmove->velocity[0] * pmove->velocity[0] + pmove->velocity[1] * pmove->velocity[1]), + maxSpeed, maxGroundSpeed, maxClimb, maxDive); + ConsolePrint(msg); + maxSpeed=0, maxGroundSpeed=0, maxClimb=0, maxDive=0; + speedMeasured = false; + } + } DrawInfoLocationText(); DrawHUDStructureNotification(); diff --git a/releases/3.2.0/source/mod/AvHServerUtil.cpp b/releases/3.2.0/source/mod/AvHServerUtil.cpp index 00d287bc..a689158a 100644 --- a/releases/3.2.0/source/mod/AvHServerUtil.cpp +++ b/releases/3.2.0/source/mod/AvHServerUtil.cpp @@ -190,7 +190,7 @@ char* AvHSUGetGameVersionString() string theGameVersionString; theGameVersionString = "v" + MakeStringFromInt(BALANCE_VAR(kGameVersionMajor)) + "." + MakeStringFromInt(BALANCE_VAR(kGameVersionMinor)) + "." + - MakeStringFromInt(BALANCE_VAR(kGameVersionRevision)) + "-537"; + MakeStringFromInt(BALANCE_VAR(kGameVersionRevision)) + "-539"; //memset(theGameVersion, 0, 1024); strcpy(theGameVersion, theGameVersionString.c_str()); diff --git a/releases/3.2.0/source/pm_shared/pm_shared.cpp b/releases/3.2.0/source/pm_shared/pm_shared.cpp index ce586ac6..44764c56 100644 --- a/releases/3.2.0/source/pm_shared/pm_shared.cpp +++ b/releases/3.2.0/source/pm_shared/pm_shared.cpp @@ -5219,19 +5219,24 @@ void PM_PreventMegaCrazyLerkPancakage() { vec3_t vertical={0,0,-1.0f}; - vec3_t forward; - vec3_t tmp; + vec3_t normalizedVelocity; + spd = Length( pmove->velocity ); - // pseudo-gravity based on angle of ascent. - AngleVectors(pmove->angles, forward, tmp, tmp); - float dp=DotProduct(forward, vertical); + + VectorCopy(pmove->velocity, normalizedVelocity); + VectorNormalize(normalizedVelocity); + float dp=DotProduct(normalizedVelocity, vertical); + if ( dp > 0 ) dp /= 10.0f; else dp /= 5.0f; - + +// if ( DotProduct(up, pmove->velocity) < 0.0f ) +// dp *= -1.0f; + maxbasespeed *= 1.0f + dp; if ( spd <= maxbasespeed )