- Converted all action functions be directly callable by the VM (though they are not yet
usable). SVN r2154 (scripting)
This commit is contained in:
parent
7ea11cd169
commit
739e684549
108 changed files with 2827 additions and 1295 deletions
|
|
@ -72,10 +72,12 @@ void ACustomBridge::BeginPlay ()
|
|||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_BridgeOrbit)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE;
|
||||
|
||||
if (self->target == NULL)
|
||||
{ // Don't crash if somebody spawned this into the world
|
||||
// independantly of a Bridge actor.
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
// Set default values
|
||||
// Every five tics, Hexen moved the ball 3/256th of a revolution.
|
||||
|
|
@ -97,18 +99,19 @@ DEFINE_ACTION_FUNCTION(AActor, A_BridgeOrbit)
|
|||
self->x = self->target->x + rotationradius * finecosine[self->angle >> ANGLETOFINESHIFT];
|
||||
self->y = self->target->y + rotationradius * finesine[self->angle >> ANGLETOFINESHIFT];
|
||||
self->z = self->target->z;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BridgeInit)
|
||||
{
|
||||
PARAM_ACTION_PROLOGUE;
|
||||
PARAM_CLASS_OPT(balltype, AActor) { balltype = NULL; }
|
||||
|
||||
angle_t startangle;
|
||||
AActor *ball;
|
||||
fixed_t cx, cy, cz;
|
||||
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_CLASS(balltype, 0);
|
||||
|
||||
if (balltype == NULL) balltype = PClass::FindClass("BridgeBall");
|
||||
|
||||
cx = self->x;
|
||||
|
|
@ -127,6 +130,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BridgeInit)
|
|||
ball->target = self;
|
||||
CALL_ACTION(A_BridgeOrbit, ball);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* never used
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue