This addresses code feedback in the previously deleted pull request
This commit is contained in:
Lucas Nicodemus 2017-07-20 18:10:16 -06:00
parent 8b18de5a2a
commit 156ce52845
2 changed files with 5 additions and 4 deletions

View file

@ -8,6 +8,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
* Fixed saving when one player is one the server and another one joins (@MarioE) * Fixed saving when one player is one the server and another one joins (@MarioE)
* Fixed /spawnmob not spawning negative IDs (@MarioE) * Fixed /spawnmob not spawning negative IDs (@MarioE)
* Validated tile placement on PlaceObject; clients can no longer place frames, paintings etc with dirt blocks (@bartico6, @ProfessorXZ) * Validated tile placement on PlaceObject; clients can no longer place frames, paintings etc with dirt blocks (@bartico6, @ProfessorXZ)
* Updated to new stat tracking system with more data so we can actually make informed software decisions (Jordan Coulam)
## TShock 4.3.24 ## TShock 4.3.24
* API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42) * API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42)

View file

@ -160,10 +160,10 @@ namespace TShockAPI
{ {
if (plugins != null) if (plugins != null)
{ {
return plugins;//Return early return plugins; //Return early
} }
plugins = new PluginItem[ServerApi.Plugins.Count];//Initialize with enough room to store the ammount of plugins loaded. plugins = new PluginItem[ServerApi.Plugins.Count]; //Initialize with enough room to store the ammount of plugins loaded.
for (var i = 0; i < ServerApi.Plugins.Count; i++) for (var i = 0; i < ServerApi.Plugins.Count; i++)
{ {
var pluginItem = new PluginItem(); var pluginItem = new PluginItem();
@ -181,10 +181,10 @@ namespace TShockAPI
{ {
if (totalMem != 0) if (totalMem != 0)
{ {
return totalMem;//Return early return totalMem; //Return early
} }
if (isMono)//Set totalMem so it can be returned later if (isMono) //Set totalMem so it can be returned later
{ {
var pc = new PerformanceCounter("Mono Memory", "Total Physical Memory"); var pc = new PerformanceCounter("Mono Memory", "Total Physical Memory");
totalMem = (pc.RawValue / 1024 / 1024 / 1024); totalMem = (pc.RawValue / 1024 / 1024 / 1024);