Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to call SDK header member functions #8

Open
jsonvillanueva opened this issue Jul 10, 2019 · 0 comments
Open

Unable to call SDK header member functions #8

jsonvillanueva opened this issue Jul 10, 2019 · 0 comments

Comments

@jsonvillanueva
Copy link

jsonvillanueva commented Jul 10, 2019

It appears that every instance of your dllmain.cpp refers to member variables by name rather than setter/getter methods. I'm wondering if your remember if that's the case for when you built this a year ago, as that is currently the case for myself.
Here's an example function for the PlayerController_TA object:
playerCar->DrawScale = 2.f; --- This works
vs.
playerCar->SetDrawScale(2.f); --- This doesn't work
When I run a debugger and step through the code in the latter section this part runs, but doesn't affect anything:
Engine_functions.h

void AActor::SetDrawScale ( float NewScale )
{
	static UFunction* pFnSetDrawScale = NULL;

	if ( ! pFnSetDrawScale )
		pFnSetDrawScale = (UFunction*) UObject::GObjObjects()->Data[ 4402 ];
	AActor_execSetDrawScale_Parms SetDrawScale_Parms;
	SetDrawScale_Parms.NewScale = NewScale;
	pFnSetDrawScale->FunctionFlags |= ~0x400;
	//if (pFnSetDrawScale)  // A change I tried to get ProcessEvent to actually change the DrawScale
	//	pFnSetDrawScale->ProcessEvent(pFnSetDrawScale, &SetDrawScale_Parms , NULL);
	this->ProcessEvent ( pFnSetDrawScale, &SetDrawScale_Parms, NULL );

	pFnSetDrawScale->FunctionFlags |= 0x400;
};

In the commented section, I tried referring to ProcessEvent through the pFnSetDrawScale UFunction*. Neither works to update DrawScale unfortunately. I'm wondering if you've tried something that's worked in the past since your dllmain.cpp has no UObject function calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant