- Updated scripting branch to latest version in trunk.
SVN r4337 (scripting)
This commit is contained in:
commit
459ad5abff
282 changed files with 15968 additions and 3535 deletions
|
|
@ -1107,7 +1107,6 @@ void APowerWeaponLevel2::EndEffect ()
|
|||
Super::EndEffect();
|
||||
if (player != NULL)
|
||||
{
|
||||
|
||||
if (player->ReadyWeapon != NULL &&
|
||||
player->ReadyWeapon->WeaponFlags & WIF_POWERED_UP)
|
||||
{
|
||||
|
|
@ -1156,6 +1155,25 @@ void APlayerSpeedTrail::Tick ()
|
|||
|
||||
IMPLEMENT_CLASS (APowerSpeed)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APowerSpeed :: Serialize
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void APowerSpeed::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
if (SaveVersion < 4146)
|
||||
{
|
||||
SpeedFlags = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
arc << SpeedFlags;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APowerSpeed :: GetSpeedFactor
|
||||
|
|
@ -1164,8 +1182,10 @@ IMPLEMENT_CLASS (APowerSpeed)
|
|||
|
||||
fixed_t APowerSpeed ::GetSpeedFactor ()
|
||||
{
|
||||
if (Inventory != NULL) return FixedMul(Speed, Inventory->GetSpeedFactor());
|
||||
else return Speed;
|
||||
if (Inventory != NULL)
|
||||
return FixedMul(Speed, Inventory->GetSpeedFactor());
|
||||
else
|
||||
return Speed;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
@ -1184,12 +1204,22 @@ void APowerSpeed::DoEffect ()
|
|||
if (Owner->player->cheats & CF_PREDICTING)
|
||||
return;
|
||||
|
||||
if (SpeedFlags & PSF_NOTRAIL)
|
||||
return;
|
||||
|
||||
if (level.time & 1)
|
||||
return;
|
||||
|
||||
// check if another speed item is present to avoid multiple drawing of the speed trail.
|
||||
if (Inventory != NULL && Inventory->GetSpeedFactor() > FRACUNIT)
|
||||
return;
|
||||
// Check if another speed item is present to avoid multiple drawing of the speed trail.
|
||||
// Only the last PowerSpeed without PSF_NOTRAIL set will actually draw the trail.
|
||||
for (AInventory *item = Inventory; item != NULL; item = item->Inventory)
|
||||
{
|
||||
if (item->IsKindOf(RUNTIME_CLASS(APowerSpeed)) &&
|
||||
!(static_cast<APowerSpeed *>(item)->SpeedFlags & PSF_NOTRAIL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (P_AproxDistance (Owner->velx, Owner->vely) <= 12*FRACUNIT)
|
||||
return;
|
||||
|
|
@ -1411,7 +1441,8 @@ void APowerTimeFreezer::DoEffect()
|
|||
Super::DoEffect();
|
||||
// [RH] Do not change LEVEL_FROZEN on odd tics, or the Revenant's tracer
|
||||
// will get thrown off.
|
||||
if (level.time & 1)
|
||||
// [ED850] Don't change it if the player is predicted either.
|
||||
if (level.time & 1 || (Owner != NULL && Owner->player != NULL && Owner->player->cheats & CF_PREDICTING))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -1503,7 +1534,7 @@ void APowerDamage::EndEffect( )
|
|||
|
||||
//===========================================================================
|
||||
//
|
||||
// APowerDamage :: AbsorbDamage
|
||||
// APowerDamage :: ModifyDamage
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue