Posts: 14
Threads: 9
Joined: Apr 2012
04-07-2012, 03:42 AM
(This post was last modified: 04-09-2012, 01:19 PM by titegtnodI.)
Code:
PlaySound(Roam, SLOT_Talk, 0.02 * Mass,,, VoicePitch);
decompiles to:
Code:
PlaySound(Roam, 5, 0.02 * Mass,,, VoicePitch);
I think this is how it works:
Code:
1 = SLOT_Misc
2 = SLOT_Pain
3 = SLOT_Interact
4 = SLOT_Ambient
5 = SLOT_Talk
6 = SLOT_Interface
It won't recompile with the value, it needs the constant.
Edit:
I think 0 is SLOT_None
Posts: 225
Threads: 27
Joined: Jan 2012
04-07-2012, 05:24 AM
(This post was last modified: 04-07-2012, 05:24 AM by eliot.)
I'm aware of this. This is because it actually is compiled as numbers and not constants. Decompiling this back might easily contain false positives, I've done it before with NetMode but when it comes to switch's and cases with multiple switches or if's it gets quite complicated to relate these numbers back to the constants!
It should recompile fine, but perhaps that's something to do with the fact that's an older version of the Engine.
Posts: 14
Threads: 9
Joined: Apr 2012
(04-07-2012, 05:24 AM)eliot Wrote: I'm aware of this. This is because it actually is compiled as numbers and not constants. Decompiling this back might easily contain false positives, I've done it before with NetMode but when it comes to switch's and cases with multiple switches or if's it gets quite complicated to relate these numbers back to the constants!
It should recompile fine, but perhaps that's something to do with the fact that's an older version of the Engine.
Maybe it's because it's an older version. I'm not sure! It would be nice if there was some way to decompile it and get the constants but I see what you mean.
It would be very difficult unless it checked the function for the type of parameter it's filling in and then cross-referenced it with an array of strings (which are the constants) to write into the parameter instead of the number. Which I'd imagine would be kind of hackish.