• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

VS plugin mod for Basic Armour


Commit MetaInfo

修訂6af62e042f136f7be1ae3644cbdab3d3426ff5bb (tree)
時間2019-05-20 03:12:37
作者melchior <melchior@user...>
Commitermelchior

Log Message

added Null entity check ~ suggested by Tyron.

Change Summary

差異

--- a/ArmourMod/Armour/AmourMeshRenderer.cs
+++ b/ArmourMod/Armour/AmourMeshRenderer.cs
@@ -42,12 +42,11 @@ namespace ArmourMod
4242 for (int i = 0; i < ClientApi.World.AllOnlinePlayers.Length; i++) {
4343 var aPlayer = ClientApi.World.AllOnlinePlayers[i];
4444
45- if (aPlayer != null) {
45+ if (aPlayer?.Entity == null) continue;//Out of range
4646
4747 EntityShapeRenderer rend = aPlayer.Entity.Properties.Client.Renderer as EntityShapeRenderer;
4848
49- if (rend == null)
50- continue;
49+ if (rend == null) continue;
5150
5251 if (aPlayer.Entity is EntityArmourPlayer) {
5352 EntityArmourPlayer armouredPlayer = aPlayer.Entity as EntityArmourPlayer;
@@ -68,7 +67,7 @@ namespace ArmourMod
6867 }
6968 }
7069 }
71- }
70+
7271 } catch (Exception problem)
7372 {
7473 ClientApi.Logger.Error("ArmourMeshRenderer FAULT: {0} Disabling.", problem.Message);