-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
wzapi: getDroidPath
that return droid path
#3793
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One conundrum: script APIs always deal with map coordinates (not world coordinates). See: Lines 80 to 81 in 981df67
Assuming map coordinates are sufficient for your use-case (and I hope they would be?) we can simply use |
ManManson
reviewed
May 3, 2024
ManManson
reviewed
May 3, 2024
ManManson
reviewed
May 3, 2024
Co-authored-by: Pavel Solodovnikov <[email protected]>
FAILED: src/CMakeFiles/warzone2100.dir/wzapi.cpp.o /usr/bin/c++ -DCURL_GNUTLS_DOES_NOT_REQUIRE_LOCKS_INIT -DENABLE_DISCORD -DJSON_USE_IMPLICIT_CONVERSIONS=0 -DNLOHMANN_JSON_NAMESPACE=nlohmann -DNLOHMANN_JSON_NAMESPACE_BEGIN="namespace nlohmann {" -DNLOHMANN_JSON_NAMESPACE_END=} -DSQLITE_ENABLE_COLUMN_METADATA -DWZ_DEBUG_GFX_API_LEAKS -DYY_NO_UNISTD_H -I/home/user/Documents/src/warzone2100/build -I/home/user/Documents/src/warzone2100/. -I/home/user/Documents/src/warzone2100/3rdparty -I/home/user/Documents/src/warzone2100/lib/wzmaplib/include -I/home/user/Documents/src/warzone2100/3rdparty/optional-lite/include -I/home/user/Documents/src/warzone2100/3rdparty/glad/include -I/home/user/Documents/src/warzone2100/3rdparty/launchinfo/include -I/home/user/Documents/src/warzone2100/3rdparty/EmbeddedJSONSignature/include -I/home/user/Documents/src/warzone2100/3rdparty/quickjs-wz -I/home/user/Documents/src/warzone2100/3rdparty/re2 -I/home/user/Documents/src/warzone2100/3rdparty/SQLiteCpp/include -isystem /home/user/Documents/src/warzone2100/3rdparty/glm -isystem /home/user/Documents/src/warzone2100/3rdparty/date/include -isystem /home/user/Documents/src/warzone2100/3rdparty/json/include -isystem /home/user/Documents/src/warzone2100/3rdparty/fmt/include -fstack-protector-strong -fstack-clash-protection -O2 -g -DNDEBUG -std=c++14 -fPIE -Wpedantic -Wall -Wextra -fno-common -fno-math-errno -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Winit-self -Woverloaded-virtual -Wstrict-null-sentinel -Wwrite-strings -Wpointer-arith -Wmissing-noreturn -Wnon-virtual-dtor -Wnull-dereference -Wduplicated-cond -Walloc-zero -Walloca-larger-than=1024 -Wrestrict -Wfloat-conversion -Wformat-security -Wstringop-truncation -Wlogical-op -Wuninitialized -Werror -Wno-float-conversion -Wno-unused-but-set-variable -Wno-sign-compare -Wno-unused-parameter -Wno-format-truncation -Wno-array-bounds -MD -MT src/CMakeFiles/warzone2100.dir/wzapi.cpp.o -MF src/CMakeFiles/warzone2100.dir/wzapi.cpp.o.d -o src/CMakeFiles/warzone2100.dir/wzapi.cpp.o -c /home/user/Documents/src/warzone2100/src/wzapi.cpp In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h:33, from /usr/include/c++/11/bits/allocator.h:46, from /usr/include/c++/11/string:41, from /home/user/Documents/src/warzone2100/./lib/framework/debug.h:299, from /home/user/Documents/src/warzone2100/./lib/framework/string_ext.h:25, from /home/user/Documents/src/warzone2100/./lib/framework/frame.h:40, from /home/user/Documents/src/warzone2100/./lib/framework/wzapp.h:24, from /home/user/Documents/src/warzone2100/src/wzapi.cpp:25: /usr/include/c++/11/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = scr_position; _Args = {int, int}; _Tp = scr_position]’: /usr/include/c++/11/bits/alloc_traits.h:516:17: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = scr_position; _Args = {int, int}; _Tp = scr_position; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<scr_position>]’ /usr/include/c++/11/bits/vector.tcc:115:30: required from ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, int}; _Tp = scr_position; _Alloc = std::allocator<scr_position>]’ /home/user/Documents/src/warzone2100/src/wzapi.cpp:2105:22: required from here /usr/include/c++/11/ext/new_allocator.h:162:11: error: new initializer expression list treated as compound expression [-fpermissive] 162 | { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/ext/new_allocator.h:162:11: error: no matching function for call to ‘scr_position::scr_position(int)’ In file included from /home/user/Documents/src/warzone2100/src/qtscript.h:26, from /home/user/Documents/src/warzone2100/src/wzapi.cpp:33: /home/user/Documents/src/warzone2100/src/wzapi.h:98:8: note: candidate: ‘scr_position::scr_position()’ 98 | struct scr_position | ^~~~~~~~~~~~ /home/user/Documents/src/warzone2100/src/wzapi.h:98:8: note: candidate expects 0 arguments, 1 provided /home/user/Documents/src/warzone2100/src/wzapi.h:98:8: note: candidate: ‘constexpr scr_position::scr_position(const scr_position&)’ /home/user/Documents/src/warzone2100/src/wzapi.h:98:8: note: no known conversion for argument 1 from ‘int’ to ‘const scr_position&’ /home/user/Documents/src/warzone2100/src/wzapi.h:98:8: note: candidate: ‘constexpr scr_position::scr_position(scr_position&&)’ /home/user/Documents/src/warzone2100/src/wzapi.h:98:8: note: no known conversion for argument 1 from ‘int’ to ‘scr_position&&’ [146/148] Building CXX object src/CMakeFiles/warzone2100.dir/multiint.cpp.o ninja: build stopped: subcommand failed.
1269339743
pushed a commit
to 1269339743/warzone2100
that referenced
this pull request
May 5, 2024
This reverts commit e025ff0.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this API returns path of a droid,
an Array of object {x:Number, y:Number}, in world coordinate.
its implement is quick and can simplify AI scripting