- Use the spawned class's scale as default for ScriptedMarine instead of

DoomPlayer.


SVN r2006 (trunk)
This commit is contained in:
Randy Heit 2009-11-29 01:56:22 +00:00
parent d14faa5f98
commit 4edd51eb09
2 changed files with 8 additions and 14 deletions

View File

@ -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.

View File

@ -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;