1
2
3
4
5
6
7
8
9
10
11
|
// rendermd2.cpp: loader code adapted from a nehe tutorial
#include "cube.h"
#import "MD2.h"
#import "MapModelInfo.h"
static OFMutableDictionary<OFString *, MD2 *> *mdllookup = nil;
static OFMutableArray<MD2 *> *mapmodels = nil;
static const int FIRSTMDL = 20;
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
|
// rendermd2.cpp: loader code adapted from a nehe tutorial
#include "cube.h"
#import "DynamicEntity.h"
#import "MD2.h"
#import "MapModelInfo.h"
static OFMutableDictionary<OFString *, MD2 *> *mdllookup = nil;
static OFMutableArray<MD2 *> *mapmodels = nil;
static const int FIRSTMDL = 20;
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
void
rendermodel(OFString *mdl, int frame, int range, int tex, float rad, float x,
float y, float z, float yaw, float pitch, bool teammate, float scale,
float speed, int snap, int basetime)
{
MD2 *m = loadmodel(mdl);
if (isoccluded(player1->o.x, player1->o.y, x - rad, z - rad, rad * 2))
return;
delayedload(m);
int xs, ys;
glBindTexture(GL_TEXTURE_2D,
tex ? lookuptexture(tex, &xs, &ys) : FIRSTMDL + m.mdlnum);
|
|
|
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
void
rendermodel(OFString *mdl, int frame, int range, int tex, float rad, float x,
float y, float z, float yaw, float pitch, bool teammate, float scale,
float speed, int snap, int basetime)
{
MD2 *m = loadmodel(mdl);
if (isoccluded(player1.o.x, player1.o.y, x - rad, z - rad, rad * 2))
return;
delayedload(m);
int xs, ys;
glBindTexture(GL_TEXTURE_2D,
tex ? lookuptexture(tex, &xs, &ys) : FIRSTMDL + m.mdlnum);
|