Re: Vehicle WEAPON names no longer shows up [message #487436 is a reply to message #487407] |
Wed, 30 April 2014 14: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.
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
|
|
|