New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for traps + spike traps + fixed several crash + console command for listing animations from an ogre mesh #209
Conversation
…n hatchery) fixes #185
Do you want to merge as it is or should I do the requested changes in this PR ? |
@hwoarangmy Sorry for not answering earlier, I had to run somewhere else (RL stuff). regards, |
I've added the requested changes after all ^^ |
The code looks fine. I'll test asap (more or less in two hours). Thanks for all the fixes :) |
Since we are using C++11, we should really be using "nullptr" rather than "NULL". |
The trap works great :-D I even managed to claim one of the two enemy traps in the player base in the skirmish 2v2 test map. For the second one, I need more Chuck Norris mechanical diggers :-D |
I didn't know it was for c++11. I will use it then ^^ |
@oyvindln Just out of curiosity, what made the team decide to use c++1x in the first place? |
Works like a charm, for both trap types :) Editor fixes for rooms and light confirmed. Merging... |
Add support for traps + spike traps + fixed several crash + console command for listing animations from an ogre mesh
I can't remember why we enabled C++11, though it's the standard, and contains a lot of useful stuff. |
... and a lot of less useful ones. And just to be clear it's a standard, not the standard. Hence my resilience about certain new keywords that adds nothing, for instance, since they aren't used by oldies and misused by newbies. Old bear speaking. ;) That said, since it's the chosen standard by the project, yes nullptr should be used. |
I don't have any experience with C++, but I think it's never a bad move to switch to a newer standard. I'm a bit sad to see so many great projects are still using Python 2 when Python 3 has been around for 6 years now. I understand that projects that started at the time of Python 2 could be reluctant to port all their codebase, but new projects should definitely use the newest implementation. I guess that applies (at least partly) to C++ too? |
Ah sure. Don't misunderstand me. :) @oyvindln is completely right and we should move on with that. Plus, if we never use it, we'll never actually know what's good and bad. ;) It was just was my human reluctancy to change expressing itself. ;) Now that's done, I'm feeling lighter. :P |
Just to be clear, is that we should use it but not enforce it and use it as an excuse to prevent a merge. IMHO, if the code is proper c++, it should go in. If there is use of the newer standard in a good way, then all the same. :) |
To test the traps, it's pretty easy. Launch the 2v2 skirmish test map. I've added 2 spike traps near your dungeon. See what happens when your creatures go there ^^
I've also added a claimed tile on the bottom right player to test the traps