Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 07:07

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Convert BoneWeight to Float ?

Discussion on Convert BoneWeight to Float ? within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2008
Posts: 3
Received Thanks: 0
Convert BoneWeight to Float ?

Hi Guys. I must convert short to float.

BoneIndex_1 = RDR.ReadByte();
BoneWeight_1 = RDR.ReadInt16(); //short
BoneIndex_2 = RDR.ReadByte();
BoneWeight_2 = RDR.ReadInt16(); //short

Help Me Please. Thanks
beydere is offline  
Old 02/25/2015, 18:24   #2


 
Requi's Avatar
 
elite*gold: 3800
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,039
Received Thanks: 8,243
I'm not familiar with SRO etc. but in the BitConverter Class of C# it's BitConverter.ToSingle();
Requi is offline  
Old 02/25/2015, 18:28   #3
 
GoneUp's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 201
Received Thanks: 73
Convert.ToSingle?
GoneUp is offline  
Old 02/25/2015, 18:37   #4
 
elite*gold: 0
Join Date: Jul 2008
Posts: 3
Received Thanks: 0
Quote:
Originally Posted by Requi View Post
I'm not familiar with SRO etc. but in the BitConverter Class of C# it's BitConverter.ToSingle();
short value is 2 byte but float is 4 byte so, not converted it.

Quote:
Originally Posted by GoneUp View Post
Convert.ToSingle?
I was Tried it. Because it is convert float. For example ;
int a = 32;
float b = Convert.ToSingle(32); // b = 32.0 but I worked out this float veriable's max value is 1 so, this veriable is 0 between 1
beydere is offline  
Old 02/25/2015, 21:16   #5
 
elite*gold: 0
Join Date: Feb 2008
Posts: 961
Received Thanks: 648
If you're referring to SilkroadsecurityAPI, use ReadSingle() .
magicanoo is offline  
Old 02/25/2015, 21:34   #6
 
elite*gold: 0
Join Date: Jul 2008
Posts: 3
Received Thanks: 0
I examine ReadSingle Method in SilkroadsecurityAPI. But Code is Same. :S
m_reader.ReadSingle(); this Code Read 4 bytes.

And: I'm not referring to it
beydere is offline  
Old 03/03/2015, 19:57   #7
 
elite*gold: 0
Join Date: Feb 2014
Posts: 19
Received Thanks: 0
use cast in cpp

or memcpy
fakeheader is offline  
Reply


Similar Threads Similar Threads
Kick to convert: easy and fast way to convert your item_proto/mob_proto to txt files!
09/07/2016 - Metin2 PServer Guides & Strategies - 21 Replies
Hi all, this is my first release :) This "kick converter" will allow you to generate txt files (item_names, item_proto, mob_proto, mob_names) for the rev-34k game. The script was written in python by me, so you need python 2.7 and MySQLDB (python extension) installed on your server. If you found any error, please report it to me and I'll fix it as soon as possibile. PS: If you get errors while converting the item_proto, please remove items that have type 29 or type 31.
Float in Vb.net
09/09/2011 - .NET Languages - 2 Replies
Gibs inzwischen ne simple Methode Float in VB.net einzubinden ? Danke im Vorraus :D
Bob's 'Float in Mid-Air' Script
03/17/2007 - WoW Exploits, Hacks, Tools & Macros - 16 Replies
Creators Description: "created my own AutoIt script to automate 'floating' in mid-air (via the logout trick). I spent quite a bit of time fine-tuning the timing. Note, however, that lag can intefere with getting a perfect float. For safest use, take the following script, and compile it yourself with AutoIt, so you can use it as a stand-alone exe. Name the exe something ambiguous. The script lets you do 3 differnt kinds of float, activated by F1, F2, F3, respectively. Experiment with...
How to Float
06/27/2005 - WoW Exploits, Hacks, Tools & Macros - 16 Replies
Ripped from BH Required Programs Wow Windows Calculator Tsearch - http://dlh.net/dl.php?lang=eng&dir=gamehac...e rs/TSearch.zip Procedure 1-First you will need to download Tsearch and unzip it.. Make sure wow is open and you are logged into your char.



All times are GMT +2. The time now is 07:07.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.