//=========================================================================================
// Project : UT2004 HackBase
// Version : 1.0
// Coder   : CheatatOr
// Website : http://cT.cheatz.to
//
// File    : cHacks.cpp
// ++      : The hacks class with WallHack
// Credits : Please read the readme.html for getting the credits
//=========================================================================================

#include "hook.h"
#include "cHacks.h"

cHacks::cHacks(){
};
cHacks::~cHacks(){
};

void cHacks::WallHack (APawn* Target, UCanvas* Canvas, bool bwire)
{
	FVector X,Y,Z,D,HisLoc;
	GetAxes(Global::MyCameraRotation,X,Y,Z);

	HisLoc = Target->Location;

	D = HisLoc - Global::MyCameraLocation;

	if ((Dot(D / D.Size(),X) > 0.7))
	{
		if(bwire)
			Canvas->DrawActor(Target,1,1,Global::PC->FovAngle);
		else
			Canvas->DrawActor(Target,0,1,Global::PC->FovAngle);

		Target->bHidden = 0;
	}
}