mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
- Use the spawned class's scale as default for ScriptedMarine instead of
DoomPlayer. SVN r2006 (trunk)
This commit is contained in:
parent
d14faa5f98
commit
4edd51eb09
2 changed files with 8 additions and 14 deletions
|
@ -1,3 +1,7 @@
|
|||
November 28, 2009
|
||||
- Use the spawned class's scale as default for ScriptedMarine instead of
|
||||
DoomPlayer.
|
||||
|
||||
November 28, 2009 (Changes by Graf Zahl)
|
||||
- fixed: Morph weapons weren't destroyed because the code checked for
|
||||
them in the unmorphed player class.
|
||||
|
|
|
@ -97,14 +97,6 @@ void AScriptedMarine::BeginPlay ()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copy the standard player's scaling
|
||||
AActor * playerdef = GetDefaultByName("DoomPlayer");
|
||||
if (playerdef != NULL)
|
||||
{
|
||||
scaleX = playerdef->scaleX;
|
||||
scaleY = playerdef->scaleY;
|
||||
}
|
||||
}
|
||||
|
||||
void AScriptedMarine::Tick ()
|
||||
|
@ -607,14 +599,12 @@ void AScriptedMarine::SetSprite (const PClass *source)
|
|||
if (source == NULL || source->ActorInfo == NULL)
|
||||
{ // A valid actor class wasn't passed, so use the standard sprite
|
||||
SpriteOverride = sprite = GetClass()->ActorInfo->OwnedStates[0].sprite;
|
||||
// Copy the standard player's scaling
|
||||
AActor * playerdef = GetDefaultByName("DoomPlayer");
|
||||
if (playerdef == NULL) playerdef = GetDefaultByType(RUNTIME_CLASS(AScriptedMarine));
|
||||
scaleX = playerdef->scaleX;
|
||||
scaleY = playerdef->scaleY;
|
||||
// Copy the standard scaling
|
||||
scaleX = GetDefault()->scaleX;
|
||||
scaleY = GetDefault()->scaleY;
|
||||
}
|
||||
else
|
||||
{ // Use the same sprite the passed class spawns with
|
||||
{ // Use the same sprite and scaling the passed class spawns with
|
||||
SpriteOverride = sprite = GetDefaultByType (source)->SpawnState->sprite;
|
||||
scaleX = GetDefaultByType(source)->scaleX;
|
||||
scaleY = GetDefaultByType(source)->scaleY;
|
||||
|
|
Loading…
Reference in a new issue