Skip to content

Commit

Permalink
game: don't abuse of teamNum to store not armed dynamite, check effec…
Browse files Browse the repository at this point in the history
…t1Time instead
  • Loading branch information
Aranud committed Nov 15, 2018
1 parent 931272f commit 1940d85
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 126 deletions.
2 changes: 1 addition & 1 deletion src/cgame/cg_ents.c
Expand Up @@ -1064,7 +1064,7 @@ static void CG_Missile(centity_t *cent)
// Don't tick until armed
if (cent->currentState.weapon == WP_DYNAMITE)
{
if (cent->currentState.teamNum < 4)
if (cent->currentState.effect1Time)
{
vec3_t velocity;

Expand Down
2 changes: 1 addition & 1 deletion src/cgame/cg_weapons.c
Expand Up @@ -550,7 +550,7 @@ static void CG_DynamiteTrail(centity_t *ent, const weaponInfo_t *wi)

BG_EvaluateTrajectory(&ent->currentState.pos, cg.time, origin, qfalse, ent->currentState.effect2Time);

if (ent->currentState.teamNum < 4)
if (ent->currentState.effect1Time)
{
mult = 0.004f * (cg.time - ent->currentState.effect1Time) / 30000.0f;
trap_R_AddLightToScene(origin, 320, (float)fabs(sin((cg.time - ent->currentState.effect1Time) * mult)), 1.0f, 0, 0, 0, REF_FORCE_DLIGHT);
Expand Down

0 comments on commit 1940d85

Please sign in to comment.