diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_local.h | 1 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 32 |
3 files changed, 22 insertions, 13 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 48dcac5a..86cb73e3 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1230,6 +1230,7 @@ extern vmCvar_t cg_drawSurfNormal; extern vmCvar_t cg_debugAlloc; extern vmCvar_t cg_wwSmoothTime; extern vmCvar_t cg_wwFollow; +extern vmCvar_t cg_zsortLEs; //TA: hack to get class an carriage through to UI module extern vmCvar_t ui_currentClass; diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 9103a361..4f5da5a8 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -181,6 +181,7 @@ vmCvar_t cg_drawSurfNormal; vmCvar_t cg_debugAlloc; vmCvar_t cg_wwSmoothTime; vmCvar_t cg_wwFollow; +vmCvar_t cg_zsortLEs; //TA: hack to get class an carriage through to UI module vmCvar_t ui_currentClass; @@ -270,6 +271,7 @@ static cvarTable_t cvarTable[] = { { &cg_debugAlloc, "cg_debugAlloc", "0", 0 }, { &cg_wwSmoothTime, "cg_wwSmoothTime", "300", CVAR_ARCHIVE }, { &cg_wwFollow, "cg_wwFollow", "1", CVAR_ARCHIVE|CVAR_USERINFO }, + { &cg_zsortLEs, "cg_zsortLEs", "1", CVAR_ARCHIVE }, { &ui_currentClass, "ui_currentClass", "0", 0 }, { &ui_carriage, "ui_carriage", "", 0 }, diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 2d86fcfd..fe6dfe98 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -986,8 +986,9 @@ CG_FlameTrail */ static void CG_FlameTrail( centity_t *cent, vec3_t origin ) { - vec3_t forward; + vec3_t forward, right, up; vec3_t muzzlePoint; + vec3_t velocity; if( cent->currentState.weapon != WP_FLAMER ) return; @@ -998,23 +999,27 @@ static void CG_FlameTrail( centity_t *cent, vec3_t origin ) if( cent->currentState.clientNum == cg.predictedPlayerState.clientNum && !cg.renderingThirdPerson ) { - AngleVectors( cg.refdefViewAngles, forward, NULL, NULL ); - VectorCopy( cg.predictedPlayerState.origin, muzzlePoint ); + AngleVectors( cg.refdefViewAngles, forward, right, up ); + VectorCopy( cg.refdef.vieworg, muzzlePoint ); + VectorMA( cg.predictedPlayerState.velocity, FIREBALL_SPEED, forward, velocity ); } else { - AngleVectors( cent->lerpAngles, forward, NULL, NULL ); + AngleVectors( cent->lerpAngles, forward, right, up ); VectorCopy( cent->lerpOrigin, muzzlePoint ); - } - - // FIXME: crouch - muzzlePoint[ 2 ] += DEFAULT_VIEWHEIGHT; - VectorMA( muzzlePoint, 14.0f, forward, muzzlePoint ); - VectorScale( forward, FIREBALL_SPEED, forward ); + //FIXME: this is gonna look weird when crouching + muzzlePoint[ 2 ] += DEFAULT_VIEWHEIGHT; + VectorMA( cent->currentState.pos.trDelta, FIREBALL_SPEED, forward, velocity ); + } - CG_LaunchSprite( muzzlePoint, forward, vec3_origin, - 0.1f, 0.0f, 40.0f, 255.0f, 192.0f, + //FIXME: tweak these numbers when (if?) the flamer model is done + VectorMA( muzzlePoint, 24.0f, forward, muzzlePoint ); + VectorMA( muzzlePoint, 6.0f, right, muzzlePoint ); + VectorMA( muzzlePoint, -6.0f, up, muzzlePoint ); + + CG_LaunchSprite( muzzlePoint, velocity, vec3_origin, + 0.1f, 4.0f, 40.0f, 255.0f, 192.0f, rand( ) % 360, cg.time, FIREBALL_LIFETIME, cgs.media.flameShader[ 0 ], qfalse, qfalse ); @@ -1217,7 +1222,8 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent } // add the flash - if ( ( weaponNum == WP_TESLAGEN ) && ( nonPredictedCent->currentState.eFlags & EF_FIRING ) ) + if ( ( weaponNum == WP_TESLAGEN || weaponNum == WP_FLAMER ) && + ( nonPredictedCent->currentState.eFlags & EF_FIRING ) ) { // continuous flash } else { |