mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
This commit is contained in:
commit
289e76cce7
2 changed files with 0 additions and 37 deletions
|
@ -480,32 +480,3 @@ void LoadActors ()
|
||||||
if (!batchrun) Printf("DECORATE parsing took %.2f ms\n", timer.TimeMS());
|
if (!batchrun) Printf("DECORATE parsing took %.2f ms\n", timer.TimeMS());
|
||||||
// Base time: ~52 ms
|
// Base time: ~52 ms
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// CreateDamageFunction
|
|
||||||
//
|
|
||||||
// Creates a damage function suitable for a constant, non-expressioned
|
|
||||||
// value.
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
VMScriptFunction *CreateDamageFunction(int dmg)
|
|
||||||
{
|
|
||||||
if (dmg == 0)
|
|
||||||
{
|
|
||||||
// For zero damage, do not create a function so that the special collision detection case still works as before.
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
VMFunctionBuilder build;
|
|
||||||
build.Registers[REGT_POINTER].Get(1); // The self pointer
|
|
||||||
build.EmitRetInt(0, false, dmg);
|
|
||||||
build.EmitRetInt(1, true, 0);
|
|
||||||
VMScriptFunction *sfunc = build.MakeFunction();
|
|
||||||
sfunc->NumArgs = 1;
|
|
||||||
return sfunc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -164,14 +164,6 @@ inline void ResetBaggage (Baggage *bag, PClassActor *stateclass)
|
||||||
bag->statedef.MakeStateDefines(stateclass);
|
bag->statedef.MakeStateDefines(stateclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// Damage function creation
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
VMScriptFunction *CreateDamageFunction(int dmg);
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// Action function lookup
|
// Action function lookup
|
||||||
|
|
Loading…
Reference in a new issue