diff options
| author | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
|---|---|---|
| committer | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
| commit | 0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch) | |
| tree | c831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/game/client/c_rope.cpp | |
| parent | Updated the SDK with the latest code from the TF and HL2 branches. (diff) | |
| download | source-sdk-2013-master.tar.xz source-sdk-2013-master.zip | |
Diffstat (limited to 'mp/src/game/client/c_rope.cpp')
| -rw-r--r-- | mp/src/game/client/c_rope.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/mp/src/game/client/c_rope.cpp b/mp/src/game/client/c_rope.cpp index 9f11fc5d..0c84778c 100644 --- a/mp/src/game/client/c_rope.cpp +++ b/mp/src/game/client/c_rope.cpp @@ -12,6 +12,7 @@ #include "input.h" #ifdef TF_CLIENT_DLL #include "cdll_util.h" +#include "tf_gamerules.h" #endif #include "rope_helpers.h" #include "engine/ivmodelinfo.h" @@ -640,6 +641,15 @@ bool CRopeManager::IsHolidayLightMode( void ) return false; } +#ifdef TF_CLIENT_DLL + if ( TFGameRules() && TFGameRules()->IsPowerupMode() ) + { + // We don't want to draw the lights for the grapple. + // They get left behind for a while and look bad. + return false; + } +#endif + bool bDrawHolidayLights = false; #ifdef USES_ECON_ITEMS @@ -1638,12 +1648,12 @@ struct catmull_t }; // bake out the terms of the catmull rom spline -void Catmull_Rom_Spline_Matrix( const Vector &p1, const Vector &p2, const Vector &p3, const Vector &p4, catmull_t &output ) +void Catmull_Rom_Spline_Matrix( const Vector &vecP1, const Vector &vecP2, const Vector &vecP3, const Vector &vecP4, catmull_t &output ) { - output.t3 = 0.5f * ((-1*p1) + (3*p2) + (-3*p3) + p4); // 0.5 t^3 * [ (-1*p1) + ( 3*p2) + (-3*p3) + p4 ] - output.t2 = 0.5f * ((2*p1) + (-5*p2) + (4*p3) - p4); // 0.5 t^2 * [ ( 2*p1) + (-5*p2) + ( 4*p3) - p4 ] - output.t = 0.5f * ((-1*p1) + p3); // 0.5 t * [ (-1*p1) + p3 ] - output.c = p2; // p2 + output.t3 = 0.5f * ( ( -1 * vecP1 ) + ( 3 * vecP2 ) + ( -3 * vecP3 ) + vecP4 ); // 0.5 t^3 * [ (-1*p1) + ( 3*p2) + (-3*p3) + p4 ] + output.t2 = 0.5f * ( ( 2 * vecP1 ) + ( -5 * vecP2 ) + ( 4 * vecP3 ) - vecP4 ); // 0.5 t^2 * [ ( 2*p1) + (-5*p2) + ( 4*p3) - p4 ] + output.t = 0.5f * ( ( -1 * vecP1 ) + vecP3 ); // 0.5 t * [ (-1*p1) + p3 ] + output.c = vecP2; // p2 } // evaluate one point on the spline, t is a vector of (t, t^2, t^3) |