extern int kTextureSize;
extern float texdetail;
extern float realtexdetail;
-extern float terraindetail;
extern float volume;
extern Objects objects;
extern int detail;
if(detail==2){
texdetail=1;
- terraindetail=1;
}
if(detail==1){
texdetail=2;
- terraindetail=1;
}
if(detail==0){
texdetail=4;
- terraindetail=1;
- //terraindetail=2;
}
LOG("Initializing sound system...");
if(detail==2){
texdetail=1;
- terraindetail=1;
}
if(detail==1){
texdetail=2;
- terraindetail=1;
}
if(detail==0){
texdetail=4;
- terraindetail=1;
- //terraindetail=2;
}
realtexdetail=texdetail;
gravity=-10;
texscale=.2/megascale/viewdistdetail;
- terrain.scale=3*megascale*terraindetail*viewdistdetail;
+ terrain.scale=3*megascale*viewdistdetail;
viewer.x=terrain.size/2*terrain.scale;
viewer.z=terrain.size/2*terrain.scale;
extern float texdetail;
extern GLubyte bloodText[512*512*3];
extern GLubyte wolfbloodText[512*512*3];
-extern float terraindetail;
extern float camerashake;
extern float woozy;
extern float blackout;
for(k=0;k<numplayers;k++){
player[k].DoAnimations();
- player[k].whichpatchx=player[k].coords.x/(terrain.size/subdivision*terrain.scale*terraindetail);
- player[k].whichpatchz=player[k].coords.z/(terrain.size/subdivision*terrain.scale*terraindetail);
+ player[k].whichpatchx=player[k].coords.x/(terrain.size/subdivision*terrain.scale);
+ player[k].whichpatchz=player[k].coords.z/(terrain.size/subdivision*terrain.scale);
}
objects.DoStuff();
FRUSTUM frustum;
float texdetail = 0;
float realtexdetail = 0;
-float terraindetail = 0;
float playerdist = 0;
Objects objects;
int slomo = 0;
extern float gravity;
extern FRUSTUM frustum;
extern Terrain terrain;
-extern float terraindetail;
extern bool foliage;
extern int detail;
extern float blurness;
static int whichpatchx;
static int whichpatchz;
- whichpatchx=p1->x/(terrain.size/subdivision*terrain.scale*terraindetail);
- whichpatchz=p1->z/(terrain.size/subdivision*terrain.scale*terraindetail);
+ whichpatchx=p1->x/(terrain.size/subdivision*terrain.scale);
+ whichpatchz=p1->z/(terrain.size/subdivision*terrain.scale);
if(whichpatchx>=0&&whichpatchz>=0&&whichpatchx<subdivision&&whichpatchz<subdivision)
if(terrain.patchobjectnum[whichpatchx][whichpatchz]>0&&terrain.patchobjectnum[whichpatchx][whichpatchz]<500)
terrainpoint=position[i]+DoRotation(model[i].vertex[j]+model[i].normals[j]*.1,0,rotation[i],0);
//terrainpoint.y+=model[i].boundingsphereradius;
shadowed[i]=0;
- patchx=terrainpoint.x/(terrain.size/subdivision*terrain.scale*terraindetail);
- patchz=terrainpoint.z/(terrain.size/subdivision*terrain.scale*terraindetail);
+ patchx=terrainpoint.x/(terrain.size/subdivision*terrain.scale);
+ patchz=terrainpoint.z/(terrain.size/subdivision*terrain.scale);
if(patchx>=0&&patchz>=0&&patchx<subdivision&&patchz<subdivision)
if(terrain.patchobjectnum[patchx][patchz])
for(k=0;k<terrain.patchobjectnum[patchx][patchz];k++){
extern float realmultiplier;
extern int slomo;
extern bool cellophane;
-extern float terraindetail;
extern float texdetail;
extern bool osx;
osx = 0;
cellophane=0;
texdetail=4;
- terraindetail=2;
slomospeed=0.25;
slomofreq=8012;
numplayers=1;
extern bool autoslomo;
extern float camerashake;
extern float woozy;
-extern float terraindetail;
extern float viewdistance;
extern float blackout;
extern int difficulty;
skeleton.joints[j].position-=average;
}
- whichpatchx=coords.x/(terrain.size/subdivision*terrain.scale*terraindetail);
- whichpatchz=coords.z/(terrain.size/subdivision*terrain.scale*terraindetail);
+ whichpatchx=coords.x/(terrain.size/subdivision*terrain.scale);
+ whichpatchz=coords.z/(terrain.size/subdivision*terrain.scale);
if(terrain.patchobjectnum[whichpatchx][whichpatchz])
for(l=0;l<terrain.patchobjectnum[whichpatchx][whichpatchz];l++){
i=terrain.patchobjects[whichpatchx][whichpatchz][l];
extern Terrain terrain;
extern Objects objects;
extern int environment;
-extern float terraindetail;
extern float camerashake;
extern bool freeze;
extern int detail;
if(free){
freetime+=multiplier;
- whichpatchx=coords->x/(terrain.size/subdivision*terrain.scale*terraindetail);
- whichpatchz=coords->z/(terrain.size/subdivision*terrain.scale*terraindetail);
+ whichpatchx=coords->x/(terrain.size/subdivision*terrain.scale);
+ whichpatchz=coords->z/(terrain.size/subdivision*terrain.scale);
terrainlight=*coords;
objects.SphereCheckPossible(&terrainlight, 1);
extern Objects objects;
extern int detail;
extern XYZ viewerfacing;
-extern float terraindetail;
extern int bloodtoggle;
extern XYZ windvector;
}
}
- whichpatchx=sprites[i]->position.x/(terrain.size/subdivision*terrain.scale*terraindetail);
- whichpatchz=sprites[i]->position.z/(terrain.size/subdivision*terrain.scale*terraindetail);
+ whichpatchx=sprites[i]->position.x/(terrain.size/subdivision*terrain.scale);
+ whichpatchz=sprites[i]->position.z/(terrain.size/subdivision*terrain.scale);
if(whichpatchx>0&&whichpatchz>0&&whichpatchx<subdivision&&whichpatchz<subdivision)
if(terrain.patchobjectnum[whichpatchx][whichpatchz]){
if(!spritehit)
extern Light light;
extern float multiplier;
extern FRUSTUM frustum;
-extern float texdetail,terraindetail;
+extern float texdetail;
extern int detail;
extern bool decals;
extern float blurness;
static float patch_size;
float temptexdetail=texdetail;
- texdetail=terraindetail;
//LoadTGA( fileName );
// Fixing filename so that it works with its own os
for(i=0;i<size;i++){
for(j=0;j<size;j++){
- heightmap[size-1-i][j]=(float)((texture.data[(i+(j*size))*texture.bpp/8]))/5/terraindetail;
+ heightmap[size-1-i][j]=(float)((texture.data[(i+(j*size))*texture.bpp/8]))/5;
}
}
points[3].x=(size/subdivision)*i;
points[3].z=(size/subdivision)*(j+1);
points[3].y=heightmap[(int)points[3].x][(int)points[3].z];
- points[0]*=scale*terraindetail;
- points[1]*=scale*terraindetail;
- points[2]*=scale*terraindetail;
- points[3]*=scale*terraindetail;
+ points[0]*=scale;
+ points[1]*=scale;
+ points[2]*=scale;
+ points[3]*=scale;
if(!done&&where.x+radius>points[0].x&&where.x-radius<points[2].x&&where.z+radius>points[0].z&&where.z-radius<points[2].z){
patchobjects[i][j][patchobjectnum[i][j]]=id;
patchobjectnum[i][j]++;
extern bool autoslomo;
extern float camerashake;
extern float woozy;
-extern float terraindetail;
extern float viewdistance;
extern float blackout;
extern int difficulty;
if(owner[i]==-1&&(velocity[i].x||velocity[i].y||velocity[i].z)&&!physics[i]){
position[i]+=velocity[i]*multiplier;
tippoint[i]+=velocity[i]*multiplier;
- whichpatchx=position[i].x/(terrain.size/subdivision*terrain.scale*terraindetail);
- whichpatchz=position[i].z/(terrain.size/subdivision*terrain.scale*terraindetail);
+ whichpatchx=position[i].x/(terrain.size/subdivision*terrain.scale);
+ whichpatchz=position[i].z/(terrain.size/subdivision*terrain.scale);
if(whichpatchx>0&&whichpatchz>0&&whichpatchx<subdivision&&whichpatchz<subdivision)
if(terrain.patchobjectnum[whichpatchx][whichpatchz]){
for(j=0;j<terrain.patchobjectnum[whichpatchx][whichpatchz];j++){
//Object collisions
- whichpatchx=(position[i].x)/(terrain.size/subdivision*terrain.scale*terraindetail);
- whichpatchz=(position[i].z)/(terrain.size/subdivision*terrain.scale*terraindetail);
+ whichpatchx=(position[i].x)/(terrain.size/subdivision*terrain.scale);
+ whichpatchz=(position[i].z)/(terrain.size/subdivision*terrain.scale);
if(whichpatchx>0&&whichpatchz>0&&whichpatchx<subdivision&&whichpatchz<subdivision)
if(terrain.patchobjectnum[whichpatchx][whichpatchz]){
for(j=0;j<terrain.patchobjectnum[whichpatchx][whichpatchz];j++){