Permalink
Browse files

mod: WIP start handle custom plane model

  • Loading branch information...
Aranud committed Feb 11, 2019
1 parent 386e0dd commit 9a2f51f85964020120822630076b398692a1fb79
Showing with 16 additions and 3 deletions.
  1. +16 −3 src/cgame/cg_ents.c
@@ -1683,15 +1683,28 @@ void CG_MovePlane(centity_t *cent)
}

// model
if (cent->currentState.teamNum == TEAM_AXIS)
if (cent->currentState.modelindex2)
{
ent.hModel = cgs.media.airstrikePlane[0];
VectorScale(ent.axis[0], cent->currentState.angles2[0], ent.axis[0]);
VectorScale(ent.axis[1], cent->currentState.angles2[1], ent.axis[1]);
VectorScale(ent.axis[2], cent->currentState.angles2[2], ent.axis[2]);
ent.nonNormalizedAxes = qtrue;

ent.hModel = cgs.gameModels[cent->currentState.modelindex2];
}
else
{
ent.hModel = cgs.media.airstrikePlane[1];
if (cent->currentState.teamNum == TEAM_AXIS)
{
ent.hModel = cgs.media.airstrikePlane[0];
}
else
{
ent.hModel = cgs.media.airstrikePlane[1];
}
}


// add to refresh list
trap_R_AddRefEntityToScene(&ent);
}

0 comments on commit 9a2f51f

Please sign in to comment.