@@ -149,8 +149,9 @@ function HumanFunctions.DoVisibleInventory(actor, showAll)
149
149
if item .ClassName == " TDExplosive" then
150
150
thrownCount = thrownCount + 1 ;
151
151
elseif item .ClassName == " HDFirearm" or item .ClassName == " HeldDevice" then
152
- if showAll or item .Radius + item .Mass > largestItem then
153
- largestItem = item .Radius + item .Mass ;
152
+ if showAll or item .Diameter + item .Mass > largestItem then
153
+ item = ToMOSprite (item );
154
+ largestItem = item .Diameter + item .Mass ;
154
155
heldCount = heldCount + 1 ;
155
156
local itemCount = math.sqrt (heldCount );
156
157
@@ -159,7 +160,7 @@ function HumanFunctions.DoVisibleInventory(actor, showAll)
159
160
-- Bigger actors carry weapons higher up, smaller weapons are carried lower down
160
161
local drawPos = actor .Pos + Vector ((- actorBack .X * 0.5 - stackX ) * actor .FlipFactor , - actorBack .Y * 0.75 ):RadRotate (actor .RotAngle );
161
162
-- Display tall objects upright
162
- local widthToHeightRatio = ToMOSprite ( item ) :GetSpriteWidth ()/ ToMOSprite ( item ) :GetSpriteHeight ();
163
+ local widthToHeightRatio = item :GetSpriteWidth ()/ item :GetSpriteHeight ();
163
164
local orientation = widthToHeightRatio > 1 and 1.57 * actor .FlipFactor or 0 ;
164
165
165
166
local tilt = (itemCount / item .Radius ) * widthToHeightRatio * actor .FlipFactor ;
@@ -168,7 +169,7 @@ function HumanFunctions.DoVisibleInventory(actor, showAll)
168
169
for player = Activity .PLAYER_1 , Activity .MAXPLAYERCOUNT - 1 do
169
170
local screen = ActivityMan :GetActivity ():ScreenOfPlayer (player );
170
171
if screen ~= - 1 and not SceneMan :IsUnseen (drawPos .X , drawPos .Y , ActivityMan :GetActivity ():GetTeamOfPlayer (player )) then
171
- PrimitiveMan :DrawBitmapPrimitive (screen , drawPos , item , rotAng , 0 , actor .HFlipped , true );
172
+ PrimitiveMan :DrawBitmapPrimitive (screen , drawPos , item , rotAng , item . Frame , actor .HFlipped , true );
172
173
end
173
174
end
174
175
end
0 commit comments