Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-26-2008, 01:46 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

the only place that seems to do some kind of calc to determine if true or false should be sent to FaceTarget() method is in perl_mob.cpp
Code:
XS(XS_Mob_FaceTarget); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_FaceTarget)
{
	dXSARGS;
	if (items < 1 || items > 3)
		Perl_croak(aTHX_ "Usage: Mob::FaceTarget(THIS, MobToFace= 0, bool update)");
	{
		Mob *		THIS;
		Mob*		MobToFace;
		bool		update;

		if (sv_derived_from(ST(0), "Mob")) {
			IV tmp = SvIV((SV*)SvRV(ST(0)));
			THIS = INT2PTR(Mob *,tmp);
		}
		else
			Perl_croak(aTHX_ "THIS is not of type Mob");
		if(THIS == NULL)
			Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");

		if (items < 2)
			MobToFace = 0;
		else {
			if (sv_derived_from(ST(1), "Mob")) {
				IV tmp = SvIV((SV*)SvRV(ST(1)));
				MobToFace = INT2PTR(Mob *,tmp);
			}
			else
				Perl_croak(aTHX_ "MobToFace is not of type Mob");
			if(MobToFace == NULL)
				Perl_croak(aTHX_ "MobToFace is NULL, avoiding crash.");
		}

		if (items < 3)
			update = false;
		else {
			update = (bool)SvTRUE(ST(2));
		}

		THIS->FaceTarget(MobToFace, update);
	}
	XSRETURN_EMPTY;
}
Im not familiar with this part of the code, can somebody comment on this? I didn't see quest::FaceTarget() used in any perl files. Is that what this is for?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:08 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3