- added Grubber's submission for customizable gravity per actor.
- Fixed: A_Jump didn't work for weapons or CustomInventory items. SVN r456 (trunk)
This commit is contained in:
parent
4f845508cc
commit
d0c910fca6
23 changed files with 121 additions and 37 deletions
|
|
@ -129,7 +129,6 @@ static flagdef ActorFlags[]=
|
|||
DEFINE_FLAG(MF, NOLIFTDROP, AActor, flags),
|
||||
DEFINE_FLAG(MF, STEALTH, AActor, flags),
|
||||
DEFINE_FLAG(MF, ICECORPSE, AActor, flags),
|
||||
DEFINE_FLAG2(MF2_LOGRAV, LOWGRAVITY, AActor, flags2),
|
||||
DEFINE_FLAG(MF2, WINDTHRUST, AActor, flags2),
|
||||
DEFINE_FLAG(MF2, HERETICBOUNCE , AActor, flags2),
|
||||
DEFINE_FLAG(MF2, BLASTED, AActor, flags2),
|
||||
|
|
@ -3224,6 +3223,22 @@ static void ActorVSpeed (AActor *defaults, Baggage &bag)
|
|||
defaults->momz = fixed_t(sc_Float*FRACUNIT);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
static void ActorGravity (AActor *defaults, Baggage &bag)
|
||||
{
|
||||
SC_MustGetFloat ();
|
||||
|
||||
if (sc_Float < 0.f || sc_Float > 1.f)
|
||||
SC_ScriptError ("Gravity must be in the range [0,1]");
|
||||
|
||||
defaults->gravity = FLOAT2FIXED (sc_Float);
|
||||
|
||||
if (sc_Float == 0.f)
|
||||
defaults->flags |= MF_NOGRAVITY;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
@ -3276,6 +3291,11 @@ static void ActorFlagSetOrReset (AActor *defaults, Baggage &bag)
|
|||
if (mod == '+') defaults->DamageType = NAME_Ice;
|
||||
else defaults->DamageType = NAME_None;
|
||||
}
|
||||
else if (SC_Compare ("LOWGRAVITY"))
|
||||
{
|
||||
if (mod == '+') defaults->gravity = FRACUNIT/8;
|
||||
else defaults->gravity = FRACUNIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
FString part1 = sc_String;
|
||||
|
|
@ -4099,6 +4119,7 @@ static const ActorProps props[] =
|
|||
{ "floatspeed", ActorFloatSpeed, RUNTIME_CLASS(AActor) },
|
||||
{ "game", ActorGame, RUNTIME_CLASS(AActor) },
|
||||
{ "gibhealth", ActorGibHealth, RUNTIME_CLASS(AActor) },
|
||||
{ "gravity", ActorGravity, RUNTIME_CLASS(AActor) },
|
||||
{ "heal", ActorHealState, RUNTIME_CLASS(AActor) },
|
||||
{ "health", ActorHealth, RUNTIME_CLASS(AActor) },
|
||||
{ "health.lowmessage", (apf)HealthLowMessage, RUNTIME_CLASS(AHealth) },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue