rott/kf_sources/KFStoryGame/Classes/StoryInventoryAttachment.uc
2026-07-14 20:27:09 +07:00

59 lines
1.6 KiB
Ucode

/*
--------------------------------------------------------------
StoryInventoryAttachment
--------------------------------------------------------------
Third person actor which represents a KF_StoryInventoryItem while
carried by a player.
Author : Alex Quick
--------------------------------------------------------------
*/
class StoryInventoryAttachment extends InventoryAttachment;
var KF_StoryInventoryItem StoryOwner;
function InitFor(Inventory I)
{
Instigator = I.Instigator;
StoryOwner = KF_StoryInventoryItem(I);
if(StoryOwner != none)
{
SetStaticMesh(StoryOwner.PickupSM);
LinkMesh(StoryOwner.Mesh);
AmbientGlow = StoryOwner.AmbientGlow;
SetDrawScale3D(StoryOwner.DrawScale3D);
SetDrawScale(StoryOwner.DrawScale);
SetDrawType(StoryOwner.DrawType);
// Lighting
if(StoryOwner.StoryPickupBase != none)
{
LightType = StoryOwner.StoryPickupBase.LightType;
LightBrightness = StoryOwner.StoryPickupBase.LightBrightness;
LightRadius = StoryOwner.StoryPickupBase.LightRadius;
LightHue = StoryOwner.StoryPickupBase.lighthue;
bUseDynamicLights = StoryOwner.StoryPickupBase.bUseDynamicLights;
LightSaturation = StoryOwner.StoryPickupBase.LightSaturation;
bDynamicLight = StoryOwner.StoryPickupBase.bDynamicLight;
bLightChanged = true;
}
}
}
defaultproperties
{
bActorShadows=true
DrawType = DT_StaticMesh;
bCollideActors=False
bCollideWorld=False
bBlockActors=False
}