Click here to Skip to main content
15,899,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 3:28
krishna_CP2-Jun-10 3:28 
GeneralRe: No of Documents and View in SDI and MDI Pin
Cedric Moonen2-Jun-10 4:25
Cedric Moonen2-Jun-10 4:25 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 4:28
krishna_CP2-Jun-10 4:28 
AnswerRe: No of Documents and View in SDI and MDI Pin
Aescleal31-May-10 20:39
Aescleal31-May-10 20:39 
AnswerRe: No of Documents and View in SDI and MDI Pin
Niklas L1-Jun-10 3:49
Niklas L1-Jun-10 3:49 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 3:29
krishna_CP2-Jun-10 3:29 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 4:34
krishna_CP2-Jun-10 4:34 
Questionserver emulator code help Pin
zeroKo31-May-10 15:31
zeroKo31-May-10 15:31 
I have it down to one error I can not fix

here it is
Error	1	error C2660: 'CBaseEntity::isFaceing' : function does not take 1 arguments	C:\Users\Josh\Desktop\pXi_r1430\src\CZoneHandler.cpp	356	1	PXI<br />


Here is the code in question

if(mob->hasBehaviour(AGGRO_SIGHT) && mob->isFaceing(schar->loc.p)) { // and in view and not usign invis<br />
            if((CUtil::distance(schar->loc.p, mob->loc.p) <= 15 )) {<br />
                mob->aggroChar(schar);<br />


Here is the function ( I think tis what it is called )

bool CBaseEntity::isFaceing(struct position p, int coneAngle) {<br />
	<br />
	//Entity's true heading<br />
	unsigned char truerot = (unsigned char)this->getRot();<br />
<br />
	//Desired heading.  Although it is extremely rare to have identical x or z coordinates, this should avoid division by 0.<br />
	if((p.x - this->loc.p.x) == 0) { <br />
		p.x += 0.001f;<br />
	}<br />
<br />
	if((p.z - this->loc.p.z) == 0) { <br />
		p.z += 0.001f;<br />
	}<br />
<br />
	float angle = atan2((p.z - this->loc.p.z),(p.x - this->loc.p.x)); //Arctangent of the slope of the line between entity and target.<br />
	unsigned char rot = (unsigned char) ((2 * 3.14159265358979f - angle) * 256 / (2 * 3.14159265358979f)); //Adjust from radians to SE's 256 degree system.<br />
	<br />
	unsigned char diff = (unsigned char) (abs(truerot - rot)); //The absolute value of the deviation from desired heading.<br />
	<br />
	if(diff <= coneAngle || diff >= (256 - coneAngle)) { //Allowed deviation.  The second case is if the target is due east (compare 254 to 2 for example).<br />
		return true; //Within acceptable range.<br />
	}<br />
<br />
	return false; //Not within acceptable range.<br />
<br />
}<br />


Any help here is greatly appreciated
AnswerRe: server emulator code help Pin
Stephen Hewitt31-May-10 16:07
Stephen Hewitt31-May-10 16:07 
GeneralRe: server emulator code help Pin
zeroKo31-May-10 17:04
zeroKo31-May-10 17:04 
GeneralRe: server emulator code help Pin
Stephen Hewitt31-May-10 20:21
Stephen Hewitt31-May-10 20:21 
GeneralRe: server emulator code help Pin
zeroKo31-May-10 23:56
zeroKo31-May-10 23:56 
GeneralRe: server emulator code help Pin
Stephen Hewitt1-Jun-10 13:55
Stephen Hewitt1-Jun-10 13:55 
GeneralRe: server emulator code help Pin
zeroKo1-Jun-10 14:12
zeroKo1-Jun-10 14:12 
QuestionBackground Color for Bitmap In Crichedtctrl Pin
ForNow31-May-10 8:57
ForNow31-May-10 8:57 
Questionhow to format numbers with dollar sign in a cell for a CListCtrl Pin
manchukuo31-May-10 8:04
manchukuo31-May-10 8:04 
AnswerRe: how to format numbers with dollar sign in a cell for a CListCtrl Pin
CPallini31-May-10 9:35
mveCPallini31-May-10 9:35 
GeneralRe: how to format numbers with dollar sign in a cell for a CListCtrl Pin
manchukuo31-May-10 11:13
manchukuo31-May-10 11:13 
GeneralRe: how to format numbers with dollar sign in a cell for a CListCtrl Pin
CPallini31-May-10 21:36
mveCPallini31-May-10 21:36 
QuestionRe: how to format numbers with dollar sign in a cell for a CListCtrl Pin
David Crow1-Jun-10 5:08
David Crow1-Jun-10 5:08 
AnswerRe: how to format numbers with dollar sign in a cell for a CListCtrl Pin
PJ Arends1-Jun-10 5:52
professionalPJ Arends1-Jun-10 5:52 
Question.:: How to convert a gotten int input into a char or string which each of their elements can be accessable separately? [C++] Pin
bijan.8k31-May-10 7:29
bijan.8k31-May-10 7:29 
AnswerRe: .:: How to convert a gotten int input into a char or string which each of their elements can be accessable separately? [C++] Pin
Luc Pattyn31-May-10 7:35
sitebuilderLuc Pattyn31-May-10 7:35 
AnswerRe: Try this code Pin
Software_Developer31-May-10 8:28
Software_Developer31-May-10 8:28 
GeneralRe: Try this code Pin
bijan.8k31-May-10 9:02
bijan.8k31-May-10 9:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.