|
@@ -490,7 +490,7 @@ void Render::display()
|
490
|
490
|
// Let's see the LoS -- should be event controled
|
491
|
491
|
if (getGame().mLara)
|
492
|
492
|
{
|
493
|
|
- // SkeletalModel *mdl = (SkeletalModel *)getGame().mLara->tmpHook;
|
|
493
|
+ // SkeletalModel *mdl = getGame().mLara->tmpHook;
|
494
|
494
|
|
495
|
495
|
// Draw in solid colors
|
496
|
496
|
glDisable(GL_TEXTURE_2D);
|
|
@@ -573,12 +573,8 @@ void Render::display()
|
573
|
573
|
// Mongoose 2002.08.15, Nothing to draw, skip
|
574
|
574
|
// Mongoose 2002.12.24, Some entities have no animation =p
|
575
|
575
|
if (e->tmpHook)
|
576
|
|
- {
|
577
|
|
- SkeletalModel *mdl = static_cast<SkeletalModel *>(e->tmpHook);
|
578
|
|
-
|
579
|
|
- if (mdl->model->animation.empty())
|
|
576
|
+ if (e->tmpHook->model->animation.empty())
|
580
|
577
|
continue;
|
581
|
|
- }
|
582
|
578
|
|
583
|
579
|
// Is it in view volume? ( Hack to use sphere )
|
584
|
580
|
if (!isVisible(e->pos[0], e->pos[1], e->pos[2], 512.0f))
|
|
@@ -608,7 +604,7 @@ void Render::display()
|
608
|
604
|
glPushMatrix();
|
609
|
605
|
glTranslatef(e->pos[0], e->pos[1], e->pos[2]);
|
610
|
606
|
glRotatef(e->angles[1], 0, 1, 0);
|
611
|
|
- drawModel(static_cast<SkeletalModel *>(e->tmpHook));
|
|
607
|
+ drawModel(e->tmpHook);
|
612
|
608
|
glPopMatrix();
|
613
|
609
|
}
|
614
|
610
|
}
|
|
@@ -849,7 +845,7 @@ void Render::drawObjects()
|
849
|
845
|
// Draw lara or other player model ( move to entity rendering method )
|
850
|
846
|
if (mFlags & Render::fViewModel && getGame().mLara && getGame().mLara->tmpHook)
|
851
|
847
|
{
|
852
|
|
- SkeletalModel *mdl = static_cast<SkeletalModel *>(getGame().mLara->tmpHook);
|
|
848
|
+ SkeletalModel *mdl = getGame().mLara->tmpHook;
|
853
|
849
|
|
854
|
850
|
if (mdl)
|
855
|
851
|
{
|
|
@@ -890,7 +886,7 @@ void Render::drawObjects()
|
890
|
886
|
glRotated(OR_RAD_TO_DEG(getCamera().getRadianYaw()), 0, 1, 0);
|
891
|
887
|
#endif
|
892
|
888
|
|
893
|
|
- drawModel(static_cast<SkeletalModel *>(getGame().mLara->tmpHook));
|
|
889
|
+ drawModel(getGame().mLara->tmpHook);
|
894
|
890
|
glPopMatrix();
|
895
|
891
|
}
|
896
|
892
|
|