mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Fixed: In the past, ZDoom worked like Doom and used integral values for
monster speeds. Now it uses fixed point so that an actor's speed property can always be considered is always fixed point. So DoSetActorProperty() should scale very slow speeds, just like dehacked's PatchThing() has done for some time now. SVN r187 (trunk)
This commit is contained in:
parent
37ab80b566
commit
2a0216cf6f
3 changed files with 75 additions and 16 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
June 13, 2006
|
||||||
|
- Fixed: In the past, ZDoom worked like Doom and used integral values for
|
||||||
|
monster speeds. Now it uses fixed point so that an actor's speed property
|
||||||
|
can always be considered is always fixed point. So DoSetActorProperty()
|
||||||
|
should scale very slow speeds, just like dehacked's PatchThing() has done
|
||||||
|
for some time now.
|
||||||
|
|
||||||
June 11, 2006 (Changes by Graf Zahl)
|
June 11, 2006 (Changes by Graf Zahl)
|
||||||
- Changed UpgradeStamina to use AInventory's Amount and MaxAmount to
|
- Changed UpgradeStamina to use AInventory's Amount and MaxAmount to
|
||||||
control the amount of upgrade and the maximum that can be reached.
|
control the amount of upgrade and the maximum that can be reached.
|
||||||
|
|
|
@ -1045,7 +1045,7 @@ static int PatchThing (int thingy)
|
||||||
}
|
}
|
||||||
// If this thing's speed is really low (i.e. meant to be a monster),
|
// If this thing's speed is really low (i.e. meant to be a monster),
|
||||||
// bump it up, because all speeds are fixed point now.
|
// bump it up, because all speeds are fixed point now.
|
||||||
if (info->Speed < 256)
|
if (abs(info->Speed) < 256)
|
||||||
{
|
{
|
||||||
info->Speed <<= FRACBITS;
|
info->Speed <<= FRACBITS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1988,21 +1988,73 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
||||||
actor->player->health = value;
|
actor->player->health = value;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case APROP_Speed: actor->Speed = value; break;
|
|
||||||
case APROP_Damage: actor->damage = value; break;
|
case APROP_Speed:
|
||||||
case APROP_Alpha: actor->alpha = value; break;
|
if (abs(value) < 128)
|
||||||
case APROP_RenderStyle: actor->RenderStyle = value; break;
|
{ // Backwards compatibility: Older ZDooms didn't use fixed point in A_Chase.
|
||||||
case APROP_Ambush: if (value) actor->flags |= MF_AMBUSH; else actor->flags &= ~MF_AMBUSH; break;
|
value <<= FRACBITS;
|
||||||
case APROP_Invulnerable:if (value) actor->flags2 |= MF2_INVULNERABLE; else actor->flags2 &= ~MF2_INVULNERABLE; break;
|
}
|
||||||
case APROP_JumpZ: if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
actor->Speed = value;
|
||||||
static_cast<APlayerPawn *>(actor)->JumpZ = value; break; // [GRB]
|
break;
|
||||||
case APROP_ChaseGoal: if (value) actor->flags5 |= MF5_CHASEGOAL; else actor->flags5 &= ~MF5_CHASEGOAL; break;
|
|
||||||
case APROP_Frightened: if (value) actor->flags4 |= MF4_FRIGHTENED; else actor->flags4 &= ~MF4_FRIGHTENED; break;
|
case APROP_Damage:
|
||||||
case APROP_SeeSound: actor->SeeSound = S_FindSound (FBehavior::StaticLookupString (value)); break;
|
actor->damage = value;
|
||||||
case APROP_AttackSound: actor->AttackSound = S_FindSound (FBehavior::StaticLookupString (value)); break;
|
break;
|
||||||
case APROP_PainSound: actor->PainSound = S_FindSound (FBehavior::StaticLookupString (value)); break;
|
|
||||||
case APROP_DeathSound: actor->DeathSound = S_FindSound (FBehavior::StaticLookupString (value)); break;
|
case APROP_Alpha:
|
||||||
case APROP_ActiveSound: actor->ActiveSound = S_FindSound (FBehavior::StaticLookupString (value)); break;
|
actor->alpha = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_RenderStyle:
|
||||||
|
actor->RenderStyle = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_Ambush:
|
||||||
|
if (value) actor->flags |= MF_AMBUSH; else actor->flags &= ~MF_AMBUSH;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_Invulnerable:
|
||||||
|
if (value) actor->flags2 |= MF2_INVULNERABLE; else actor->flags2 &= ~MF2_INVULNERABLE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_JumpZ:
|
||||||
|
if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||||
|
static_cast<APlayerPawn *>(actor)->JumpZ = value;
|
||||||
|
break; // [GRB]
|
||||||
|
|
||||||
|
case APROP_ChaseGoal:
|
||||||
|
if (value)
|
||||||
|
actor->flags5 |= MF5_CHASEGOAL;
|
||||||
|
else
|
||||||
|
actor->flags5 &= ~MF5_CHASEGOAL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_Frightened:
|
||||||
|
if (value)
|
||||||
|
actor->flags4 |= MF4_FRIGHTENED;
|
||||||
|
else
|
||||||
|
actor->flags4 &= ~MF4_FRIGHTENED;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_SeeSound:
|
||||||
|
actor->SeeSound = S_FindSound (FBehavior::StaticLookupString (value));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_AttackSound:
|
||||||
|
actor->AttackSound = S_FindSound (FBehavior::StaticLookupString (value));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_PainSound:
|
||||||
|
actor->PainSound = S_FindSound (FBehavior::StaticLookupString (value));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_DeathSound:
|
||||||
|
actor->DeathSound = S_FindSound (FBehavior::StaticLookupString (value));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_ActiveSound:
|
||||||
|
actor->ActiveSound = S_FindSound (FBehavior::StaticLookupString (value));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue