mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
Fix stack balancing problems by refactoring execution calls
- Con::executef now uses a template - All public execution functions now restore the console stack upon return - Fixed bad parameters on some callbacks - Reverts get*Arg behavior
This commit is contained in:
parent
b1ad72692c
commit
f44a3f27d6
43 changed files with 1781 additions and 358 deletions
|
|
@ -292,7 +292,7 @@ IMPLEMENT_CALLBACK( Item, onStickyCollision, void, ( const char* objID ),( objID
|
|||
"@see Item, ItemData\n"
|
||||
);
|
||||
|
||||
IMPLEMENT_CALLBACK( Item, onEnterLiquid, void, ( const char* objID, const char* waterCoverage, const char* liquidType ),( objID, waterCoverage, liquidType ),
|
||||
IMPLEMENT_CALLBACK( Item, onEnterLiquid, void, ( const char* objID, F32 waterCoverage, const char* liquidType ),( objID, waterCoverage, liquidType ),
|
||||
"Informs an Item object that it has entered liquid, along with information about the liquid type.\n"
|
||||
"@param objID Object ID for this Item object.\n"
|
||||
"@param waterCoverage How much coverage of water this Item object has.\n"
|
||||
|
|
@ -1005,7 +1005,7 @@ void Item::updatePos(const U32 /*mask*/, const F32 dt)
|
|||
{
|
||||
if(!mInLiquid && mWaterCoverage != 0.0f)
|
||||
{
|
||||
onEnterLiquid_callback( getIdString(), Con::getFloatArg(mWaterCoverage), mLiquidType.c_str() );
|
||||
onEnterLiquid_callback( getIdString(), mWaterCoverage, mLiquidType.c_str() );
|
||||
mInLiquid = true;
|
||||
}
|
||||
else if(mInLiquid && mWaterCoverage == 0.0f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue