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 #487427 is a reply to message #487407] Wed, 30 April 2014 06:54 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
Hmm, looking in the code I noticed something a bit... odd...

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



It is checking the ID against the number of entries in the translation table... but I believe it is perfectly valid and, in fact, expected, for there to be gaps in the table so the highest indexes would be > the count of entries in the table, resulting in it failing that check. What's your take on that jonwil?

It could be that is the source of the bug, try using a string with a low ID and see if that shows up properly to prove it out.


The extra check was added in commit c4ce60fa629cbdaebc3a2e825f8d67c8391d9dc2 in 2009, apparently to fix an FDS bug, so that explains why it's not an issue in 3.4.4




It's also worth checking out BeaconGameObj.cpp (line 475) and tdbedit.cpp (line 92) as those also appear to check an ID against the number of entries in the translation database...


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Wed, 30 April 2014 07:01]

Report message to a moderator

 
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: Fri Jan 31 20:48:29 MST 2025

Total time taken to generate the page: 0.00853 seconds