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 #487436 is a reply to message #487407] Wed, 30 April 2014 14:58 Go to previous messageGo to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma:
General (3 Stars)

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.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
 
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: Sun Dec 22 05:56:03 MST 2024

Total time taken to generate the page: 0.00890 seconds