mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- added DavidPH's A_SetMass submission.
SVN r3105 (trunk)
This commit is contained in:
parent
090922e1c2
commit
e4b236cbcc
4 changed files with 25 additions and 0 deletions
|
@ -2543,6 +2543,7 @@ enum
|
|||
APROP_ScaleX = 29,
|
||||
APROP_ScaleY = 30,
|
||||
APROP_Dormant = 31,
|
||||
APROP_Mass = 32,
|
||||
};
|
||||
|
||||
// These are needed for ACS's APROP_RenderStyle
|
||||
|
@ -2731,6 +2732,10 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
actor->scaleY = value;
|
||||
break;
|
||||
|
||||
case APROP_Mass:
|
||||
actor->Mass = value;
|
||||
break;
|
||||
|
||||
default:
|
||||
// do nothing.
|
||||
break;
|
||||
|
@ -2796,6 +2801,7 @@ int DLevelScript::GetActorProperty (int tid, int property)
|
|||
case APROP_WaterLevel: return actor->waterlevel;
|
||||
case APROP_ScaleX: return actor->scaleX;
|
||||
case APROP_ScaleY: return actor->scaleY;
|
||||
case APROP_Mass: return actor->Mass;
|
||||
|
||||
default: return 0;
|
||||
}
|
||||
|
@ -2833,6 +2839,7 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value)
|
|||
case APROP_WaterLevel:
|
||||
case APROP_ScaleX:
|
||||
case APROP_ScaleY:
|
||||
case APROP_Mass:
|
||||
return (GetActorProperty(tid, property) == value);
|
||||
|
||||
// Boolean values need to compare to a binary version of value
|
||||
|
|
|
@ -2037,6 +2037,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetScale)
|
|||
self->scaleY = scaley ? scaley : scalex;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_SetMass(int mass)
|
||||
//
|
||||
// Sets the actor's mass.
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetMass)
|
||||
{
|
||||
ACTION_PARAM_START(2);
|
||||
ACTION_PARAM_INT(mass, 0);
|
||||
|
||||
self->Mass = mass;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_SpawnDebris
|
||||
|
|
|
@ -61,6 +61,7 @@ DEFINE_MEMBER_VARIABLE(args, AActor)
|
|||
DEFINE_MEMBER_VARIABLE(ceilingz, AActor)
|
||||
DEFINE_MEMBER_VARIABLE(floorz, AActor)
|
||||
DEFINE_MEMBER_VARIABLE(health, AActor)
|
||||
DEFINE_MEMBER_VARIABLE(Mass, AActor)
|
||||
DEFINE_MEMBER_VARIABLE(pitch, AActor)
|
||||
DEFINE_MEMBER_VARIABLE(special, AActor)
|
||||
DEFINE_MEMBER_VARIABLE(special1, AActor)
|
||||
|
|
|
@ -32,6 +32,7 @@ ACTOR Actor native //: Thinker
|
|||
native fixed_t ceilingz;
|
||||
native fixed_t floorz;
|
||||
native int health;
|
||||
native int mass;
|
||||
native angle_t pitch;
|
||||
native int special;
|
||||
native int tid;
|
||||
|
@ -207,6 +208,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_FadeOut(float reduce = 0.1, bool remove = true);
|
||||
action native A_FadeTo(float target, float amount = 0.1, bool remove = false);
|
||||
action native A_SetScale(float scalex, float scaley = 0);
|
||||
action native A_SetMass(int mass);
|
||||
action native A_SpawnDebris(class<Actor> spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1);
|
||||
action native A_CheckSight(state label);
|
||||
action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);
|
||||
|
|
Loading…
Reference in a new issue