Build 189 Team Chat Text Bugfix

BobLOLnessBobLOLness Join Date: 2011-12-07 Member: 136950Members
Not really a mod but a fix for Unknown Worlds, Wasn't sure where to send this so i thought i put it here.

1) In patch 189, if you team chat while dead the message is missing the Team prefix. This is causing people to think they are "all talking" when they aren't.

I added a line to Chat.lua to fix this.

2) Also team chat while alive for marines doesn't prefix the location, where as alien team chat does.

I had a look into this and found that is caused by Marine.lua overriding GetLocationName and SetLocationName and declaring a currentLocation networkVar. Not sure why that is needed as ScriptActor is already tracking this info as locationId networkVar. I couldn't find currentLocation used anywhere else apart from the overrides and the overrides prevent scriptActor.locationId being set, so i deleted the overrides and and the networkVar.

The second fix removes a networkVar and therefore will <b>require</b> both server and client to have updated files.

here is the diff.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->--- Chat.lua    Mon Jan 19 22:26:36 1970
+++ Chat.lua    Mon Jan 19 22:26:36 1970
@@ -153,6 +153,8 @@
         locationId = tonumber(locationId)
         if locationId ~= 0 then
             locationNameText = string.format("(Team, %s) ", Shared.GetString(locationId))
+     else
+         locationNameText = "(Team) "
         end
        
         // Pre-pend "team" or "all"
--- Marine.lua    Mon Jan 19 22:26:36 1970
+++ Marine.lua    Mon Jan 19 22:26:36 1970
@@ -79,7 +79,6 @@
    
     timeOfLastDrop                  = "float",
     inventoryWeight                 = "compensated float",
-    currentLocation                 = "integer",
    
     timeLastSpitHit                 = "float"
    
@@ -164,14 +163,6 @@
     end
                    
end
-
-function Marine:GetLocationName()
-    return Shared.GetString(self.currentLocation)
-end
-
-function Marine:SetLocationName(locationName)
-    self.currentLocation = Shared.GetStringIndex(locationName)
-end    

function Marine:GetSlowOnLand()
     return true<!--c2--></div><!--ec2-->

Hopefully helpful to the devs.

Comments

Sign In or Register to comment.