- Added PinkSilver's SetActorVelocity code submission (with optimizations.)
SVN r1799 (trunk)
This commit is contained in:
parent
e8d1416d81
commit
93f6f1d701
4 changed files with 41 additions and 0 deletions
|
|
@ -478,6 +478,26 @@ bool P_Thing_Raise(AActor *thing)
|
|||
return true;
|
||||
}
|
||||
|
||||
void P_Thing_SetVelocity(AActor *actor, fixed_t vx, fixed_t vy, fixed_t vz, bool add)
|
||||
{
|
||||
if (actor != NULL)
|
||||
{
|
||||
if (!add)
|
||||
{
|
||||
actor->velx = actor->vely = actor->velz = 0;
|
||||
if (actor->player != NULL) actor->player->velx = actor->player->vely = 0;
|
||||
}
|
||||
actor->velx += vx;
|
||||
actor->vely += vy;
|
||||
actor->velz += vz;
|
||||
if (actor->player != NULL)
|
||||
{
|
||||
actor->player->velx += vx;
|
||||
actor->player->vely += vy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CCMD (dumpspawnables)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue