Blastfrog Posted December 12, 2015 I've got some crappy jump/jetpack code I wrote for my project in Eternity, but as I'm moving over to GZDoom I've run into problems. In its current state, the intended flow is all screwed up, can't control my jump height and the jetpack seems to only work when it wants to. It worked fine in Eternity, though. I'm too exhausted from doing stuff today and don't have the energy to debug it myself, can any of you check out the code and see what I'm doing wrong? Search for "jumpStage" to see where my changes are. Here's the GZDoom version: http://pastebin.com/LdHw2rTh Here's the original for comparison: http://pastebin.com/mxCd2Hyi 0 Quote Share this post Link to post
Blastfrog Posted December 20, 2015 I've managed to work out most of the kinks myself, but I've got a problem with the comparison operators. I want to check when the player is not holding the jump key, but it keeps screwing up when other keys are held down. Which operator should I use? Currently I'm using != which worked fine in the Eternity version of my code, but here it only works as long as the jump key is the only key I touch. 0 Quote Share this post Link to post
scifista42 Posted December 20, 2015 Do you mean this statement?cmd->actions != AC_JUMPIf "cmd->actions" is a variable holding a flag list, and "AC_JUMP" is a flag identifier, try to replace the above statement with this one:!(cmd->actions & AC_JUMP) 0 Quote Share this post Link to post
Blastfrog Posted December 20, 2015 Thanks, it works fine now! :) Is there a low gravity flag I can set on the player? I see a few references to one, but I'd rather not use the deprecated one. There's A_LowGravity, how can I set that inside the source and not in DECORATE? 0 Quote Share this post Link to post
Gez Posted December 20, 2015 In ZDoom, gravity is a property. You'll want to change the player mobj's gravity setting instead of setting or unsetting a flag. 0 Quote Share this post Link to post
Blastfrog Posted December 20, 2015 It's working well, thank you. :) 0 Quote Share this post Link to post
Blastfrog Posted December 30, 2015 Trying to build GZDoom-GPL with OpenAL enabled gets me this: http://pastebin.com/N5H292cn I wonder what I'm doing wrong. 0 Quote Share this post Link to post
Gez Posted December 30, 2015 http://stackoverflow.com/questions/14710577/error-lnk2026-module-unsafe-for-safeseh-image http://stackoverflow.com/questions/10599940/module-unsafe-for-safeseh-image-c https://msdn.microsoft.com/en-us/library/100ezk17.aspx The ZDoom codebase doesn't make much use of exceptions anyway (haven't seen much try/catch constructions in it) so I don't see a reason to build with /SAFESEH. 0 Quote Share this post Link to post
Graf Zahl Posted December 30, 2015 Sodaholic said:Trying to build GZDoom-GPL with OpenAL enabled gets me this: http://pastebin.com/N5H292cn I wonder what I'm doing wrong. The import library that comes with OpenAL Soft is broken and unusable on modern Microsoft compilers. The /SAFESEH error is just one manifestation, but this import library also generates somewhat inefficient code due to its brokenness. Get the official OpenAL SDK which contains a proper one. 0 Quote Share this post Link to post
Blastfrog Posted January 17, 2016 Strangely, it fails and falls back to nosound mode. I am using the official OpenAL SDK. It compiles without error, just doesn't work in practice. 0 Quote Share this post Link to post
Jaxxoon R Posted January 17, 2016 Yeah, I was wondering what the whole no sound thing was about. I assumed it was just there were no sounds included to save space. And I've had some nasty issues myself in trying to compile a GZDoom with OpenAL. I've done it in the past with just plain GZ+FMOD but toying with GLOOME has only led to an executable that commits seppuku. The sad thing is, I didn't even plan on editing anything on the code side of things, I just wanted to change the stupid icon for a derpy thrown together Solek game and now I wonder why I bothered in the first place since no would really even care. 0 Quote Share this post Link to post
Graf Zahl Posted January 17, 2016 Sodaholic said:it fails What's the precise message you get? 0 Quote Share this post Link to post
Blastfrog Posted January 17, 2016 Graf Zahl said:What's the precise message you get?"Sound init failed. Using nosound." when I try the restart sound option. I don't see anything upon starting up the game. 0 Quote Share this post Link to post
Quasar Posted January 17, 2016 Gez said:http://stackoverflow.com/questions/14710577/error-lnk2026-module-unsafe-for-safeseh-image http://stackoverflow.com/questions/10599940/module-unsafe-for-safeseh-image-c https://msdn.microsoft.com/en-us/library/100ezk17.aspx The ZDoom codebase doesn't make much use of exceptions anyway (haven't seen much try/catch constructions in it) so I don't see a reason to build with /SAFESEH. Actually the purpose of SAFESEH is nothing to do with C++ exception handling but to do with preventing injection of SEH handlers into your application by malware. It's best practice to have it enabled, but when linking, all static libraries must have been compiled with it enabled for it to work. We recently ran into this same issue while test-migrating Turok to VC2015. Is Creative ever going to upload their OpenAL library again? It has a date of 2009 on it. That's fucking ancient. 0 Quote Share this post Link to post
Graf Zahl Posted January 17, 2016 Sodaholic said:"Sound init failed. Using nosound." when I try the restart sound option. I don't see anything upon starting up the game. Have you installed OpenAL? Or do you have OALĂ–-Soft in your game directory? 0 Quote Share this post Link to post
Blastfrog Posted January 18, 2016 Graf Zahl said:Have you installed OpenAL?I didn't know that was a requirement, I thought it would've worked fine as-is. After installing, it partially works, but not fully. It will only play Doom format sounds. No WAVs, no OGGs, etc. 0 Quote Share this post Link to post
Graf Zahl Posted January 18, 2016 For that you need libsndfile.dll and libmpg123.dll. You can find those in any devbuild package of GZDoom. OpenAL does not have any decoding facilities. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.