Skip to content

Commit

Permalink
v3.0.2 fixes NRE with modded content (like vehicle framework)
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed May 12, 2024
1 parent 7e459ca commit f325b24
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Binary file modified 1.5/Assemblies/CameraPlus.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</li>
</modDependencies>
<packageId>brrainz.cameraplus</packageId>
<modVersion>3.0.1.0</modVersion>
<modVersion>3.0.2.0</modVersion>
<steamAppId>867467808</steamAppId>
<url>https://github.com/pardeike/CameraPlus</url>
<description>You want more zoom and different paning?
Expand Down
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>net.pardeike.rimworld.mod.cameraplus</identifier>
<version>3.0.1.0</version>
<version>3.0.2.0</version>
<targetVersions>
<li>1.0.0</li>
<li>1.1.0</li>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ModName>Camera+</ModName>
<ModFileName>CameraPlus</ModFileName>
<Repository>https://github.com/pardeike/CameraPlus</Repository>
<ModVersion>3.0.1.0</ModVersion>
<ModVersion>3.0.2.0</ModVersion>
<ProjectGuid>{AC5EE7A1-16EA-498D-B21A-83ACF78F0E5A}</ProjectGuid>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions Source/DotTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ static void DrawMarker(Pawn pawn, Material materialMarker)
var q = pawn.Downed ? downedRotation : Quaternion.identity;
var posMarker = pawn.Drawer.renderer.GetBodyPos(pawn.DrawPos, pawn.GetPosture(), out _);
_ = pawn.Drawer.renderer.renderTree.nodesByTag.TryGetValue(PawnRenderNodeTagDefOf.Body, out var bodyNode);
var drawSize = (bodyNode.Graphic.drawSize.x + bodyNode.Graphic.drawSize.y) / 2;
var matrixMarker = Matrix4x4.TRS(posMarker, q, Vector3.one * Mathf.Pow(drawSize, 1 / markerSizeScaler) * markerScale * Settings.dotRelativeSize);
var size = (bodyNode?.Graphic ?? pawn.Graphic)?.drawSize ?? pawn.DrawSize;
var matrixMarker = Matrix4x4.TRS(posMarker, q, Vector3.one * Mathf.Pow((size.x + size.y) / 2, 1 / markerSizeScaler) * markerScale * Settings.dotRelativeSize);
var mesh = pawn.Rotation == Rot4.West ? meshWest : meshEast;
Graphics.DrawMesh(mesh, matrixMarker, materialMarker, 0);
}
Expand Down

0 comments on commit f325b24

Please sign in to comment.