diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 64a480429..952c2f0ea 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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. diff --git a/src/g_doom/a_scriptedmarine.cpp b/src/g_doom/a_scriptedmarine.cpp index 9f6f54051..763fd26b9 100644 --- a/src/g_doom/a_scriptedmarine.cpp +++ b/src/g_doom/a_scriptedmarine.cpp @@ -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;