Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Vehicle WEAPON names no longer shows up
Re: Vehicle WEAPON names no longer shows up [message #487437 is a reply to message #487436] Wed, 30 April 2014 21:43 Go to previous messageGo to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
Registered: July 2006
Location: USA
Karma:
General (3 Stars)
jonwil wrote on Wed, 30 April 2014 15:58

I cant remember why I made the change.
Based on a reading of TranslateDBClass::Find_Object(uint32 id) in TranslateDBClass.h and other stuff in TranslateDBClass.h, the correct way to do what I was doing would have been to do something like this:

const wchar_t *VehicleGameObj::Get_Vehicle_Name()
{
	if (( Get_Definition().VehicleNameID != 0 ) && (Get_Definition().VehicleNameID-1000 < TranslateDBClass::Get_Object_Count())) {
		return TranslateDBClass::Get_String( Get_Definition().VehicleNameID );
	}
	return TRANSLATE(12648);
}


In the case of BeaconGameObj.cpp, its correctly subtracting 1000 (aka ID_MIN) before doing the comparison.
Checking tdbedit, it looks like Goto in tdbedit.cpp (based on the things that call it) is supposed to take an index into the TranslateDBClass array and therefore is doing what it should be doing.

So in theory if you make sure that there is a string with an ID that's at least 1000 more than the IDs you are using for your weapon strings, it SHOULD work. (hence why it works for other people)

As for an actual fix, I will commit a fix to 5.0 (where work is going forward) and to 4.2 (our stable branch) but we wont be releasing a fix for 4.1 at this time.


Sounds good thanks, for a second I thought you were going to make me add 100 id's just to make this work lol.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Feature request, clients update objectives
Next Topic: tdbedit.exe fails to list the strings I have under the default tab in my strings file.
Goto Forum:
  


Current Time: Sat Dec 21 23:28:25 MST 2024

Total time taken to generate the page: 0.01146 seconds