Eliot's Forum
PlaySound Constants Decompile to Value, Not Constant [Unreal 227h] - Printable Version

+- Eliot's Forum (https://eliotvu.com/forum)
+-- Forum: UE Explorer (https://eliotvu.com/forum/forumdisplay.php?fid=1)
+--- Forum: General (https://eliotvu.com/forum/forumdisplay.php?fid=3)
+---- Forum: Issues (https://eliotvu.com/forum/forumdisplay.php?fid=4)
+---- Thread: PlaySound Constants Decompile to Value, Not Constant [Unreal 227h] (/showthread.php?tid=10)



PlaySound Constants Decompile to Value, Not Constant [Unreal 227h] - titegtnodI - 04-07-2012

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



RE: PlaySound Constants Decompile to Value, Not Constant [Unreal 227h] - eliot - 04-07-2012

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.


RE: PlaySound Constants Decompile to Value, Not Constant [Unreal 227h] - titegtnodI - 04-07-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.