Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Commands->Select_Weapon doesn't work clientside.
Re: Commands->Select_Weapon doesn't work clientside. [message #487372 is a reply to message #487370] Fri, 25 April 2014 16:29 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 Fri, 25 April 2014 17:09

The script M00_Select_Empty_Hands does this
Commands->Select_Weapon(obj,0);
Passing 0 to Select_Weapon will cause WeaponBagClass::Deselect to be called. I should point out that index 0 in a WeaponBagClass is always empty (i.e. "No weapon") because of the code in the WeaponBagClass constructor.
Try passing 0 instead of "" and see what happens. (although from a reading of the code for WeaponBagClass::Select_Weapon_Name it may not make much difference)

Also you could try calling Select_Weapon once, then Send_Object_Update (from engine_tt.cpp) on the object then Select_Weapon another time. Although I dont know how it would work...


I tried select "0" and that didn't have any effect (I almost feel like the first select weapon gets ignored and the second one just happens, almost as if the code was optimized in such a way that it goes "Oh hey look, he selected another weapon right after this select, ignore the first and do the second).

I will give that Send_Object_Update a try later, I'd do it right now but my router just decided to be a piece of shit and isn't letting me negotiate the firewall 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
Previous Topic: tdbedit.exe fails to list the strings I have under the default tab in my strings file.
Next Topic: Possibly memory leak SSGM
Goto Forum:
  


Current Time: Sun Dec 22 09:16:44 MST 2024

Total time taken to generate the page: 0.01530 seconds