<commit_before>#include "RobotCamera.h"


RobotCamera::RobotCamera(GLint viewWidth, GLint viewHeight, GLfloat viewNearPlane, GLfloat viewFarPlane)
{
	Camera::initialize(viewWidth, viewHeight, viewNearPlane, viewFarPlane);
	hasRobot = false;
	//camera location

	locX = 0.0f;
	locY = 0.0f;
	locZ = 0.0f;
	lookAt[0] = 0.0f;
	lookAt[1] = 0.0f;
	lookAt[2] = 0.0f;
	fovy = DEFAULT_FOVY;
	robot = NULL;

}

void RobotCamera::view(){
	if(hasRobot){
		glMatrixMode(GL_PROJECTION); //why?
		glLoadIdentity();
		gluPerspective(fovy,viewWidth/viewHeight, viewNearPlane, viewFarPlane);
		gluLookAt(locX, locY, locZ,lookAt[0], lookAt[1], lookAt[2],0,1,0);
		//updateFog();
	}
}

void RobotCamera::updateFog()
{
        GLfloat flowLight[] = {0.5, 0.5, 0.5, 1};
        glEnable(GL_FOG);
        glFogfv(GL_FOG_COLOR, flowLight);
        glFogf(GL_FOG_START, locZ);
        glFogf(GL_FOG_END, locZ + 10);
        glFogf(GL_FOG_DENSITY, 0.4f);
        glFogi(GL_FOG_MODE, GL_LINEAR);
}
<commit_msg>fixed the see through the walls bug in deathmatch<commit_after>#include "RobotCamera.h"


RobotCamera::RobotCamera(GLint viewWidth, GLint viewHeight, GLfloat viewNearPlane, GLfloat viewFarPlane)
{
	Camera::initialize(viewWidth, viewHeight, viewNearPlane, viewFarPlane);
	hasRobot = false;
	//camera location

	locX = 0.0f;
	locY = 0.0f;
	locZ = 0.0f;
	lookAt[0] = 0.0f;
	lookAt[1] = 0.0f;
	lookAt[2] = 0.0f;
	fovy = DEFAULT_FOVY;
	robot = NULL;

}

void RobotCamera::view(){
	if(hasRobot){
		glMatrixMode(GL_PROJECTION); //why?
		glLoadIdentity();
		gluPerspective(fovy,viewWidth/viewHeight, 0.1, viewFarPlane);
		gluLookAt(locX, locY, locZ,lookAt[0], lookAt[1], lookAt[2],0,1,0);
		//updateFog();
	}
}

void RobotCamera::updateFog()
{
        GLfloat flowLight[] = {0.5, 0.5, 0.5, 1};
        glEnable(GL_FOG);
        glFogfv(GL_FOG_COLOR, flowLight);
        glFogf(GL_FOG_START, locZ);
        glFogf(GL_FOG_END, locZ + 10);
        glFogf(GL_FOG_DENSITY, 0.4f);
        glFogi(GL_FOG_MODE, GL_LINEAR);
}

{'fraction_non_alphanumeric': 0.14809236947791166, 'fraction_numerical': 0.03313253012048193, 'mean_word_length': 4.13659793814433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6585526', 'n_tokens_mistral': 933, 'n_tokens_neox': 872, 'n_words': 146}