[RESOURCE] Default functions & their parameters

Author Topic: [RESOURCE] Default functions & their parameters  (Read 2186 times)

If you need to parent something and are unsure what different parameters certain functions require or just don't know how to use a function, here is a list of each function.

Server functions
Client functions

I figured this would make things easier than having to use trace to figure out what each variable was used for.

someone pin this stuff ASAP

someone pin this stuff ASAP
pls

What does writeFuncOffCheck(%file, %fnNamespace, %fnName, %protectANY) do?

pls

What does writeFuncOffCheck(%file, %fnNamespace, %fnName, %protectANY) do?
Code: [Select]
function writeFuncOffCheck(%file, %fnNamespace, %fnName, %protectANY)
{
if (getBuildString() !$= "Debug" && getBuildString() !$= "Release")
{
return;
}
%offset = getFunctionOffset(%fnNamespace, %fnName);
if (%fnNamespace $= "")
{
%file.writeLine("if(  (fnNamespace == NULL) && !dStricmp(fnName, " @ %fnName @ ") && (ip != " @ %offset @ ")  )");
%file.writeLine("   fail = true;");
}
else
{
if (%protectANY)
{
%file.writeLine("if(  fnNamespace && !dStricmp(fnName, " @ %fnName @ ") && (ip != " @ %offset @ ")  )");
%file.writeLine("   fail = true;");
}
else
{
%file.writeLine("if(  fnNamespace && !dStricmp(fnNamespace, " @ %fnNamespace @ "\") && !dStricmp(fnName, " @ %fnName @ ") && (ip != " @ %offset @ ")  )");
%file.writeLine("   fail = true;");
}
}
}

Nothing we're able to use, looks like it's only used for debugging as our buildString is "Ship". Not sure what getFunctionOffset does but it's not included with our builds.

Would you please post the source code for GameConnection::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc)?

I'm looking for the code that triggers midair kills.  It will constantly detect a false positive if the map you're in is made up of TSStatic objects.
I made a workaround that bypasses midair kills entirely, but it would be better to make a support script that expands the types of objects it detects as "ground".

Posted on my topic. The default function already has StaticShapeObjectType included in the mask; could it be that your shapes need a LosCol or are not of the StaticShape type?
« Last Edit: June 12, 2017, 11:42:40 PM by Mocha »

need a LosCol or are not of the StaticShape type?
They are TSStatic.  But it is likely the LOSCol thing.

They are TSStatic.  But it is likely the LOSCol thing.
irrc tsstatic != staticshape. one thing they cannot do is have glowing bits


functionally shouldnt change at all if you replace all instances of ts static with staticshape (and the datablock ofc) but maybe i dont know something

TSStatics use $TypeMasks::StaticTSObjectType which is not included in that mid-air check, so it returns true when it hits the fxPlane