spring: develop b0ebe8e0 | [ Diff ] [ Back to Repository ] | |||
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
sprunk | Eshed | develop | 2019-05-14 19:45:51 | develop 52b1816e |
Changeset | Add `GetCurrentCamera`, tableless `GetCameraState` (#454) * Add `GetCurrentCamera`, tableless `GetCameraState` `Spring.GetCurrentCamera` returns the name of the current camera, for example "ta" or "spring" (currently available under the `name` key in the table returned by `Spring.GetCameraState`). `Spring.GetCameraState` now accepts a boolean parameter; if it is false then instead of allocating a table, it returns cam-specific values onto the stack (use `GetCurrentCamera` first to know how to interpret them; use `GetCamera{Position,Direction,FOV}` to get the non-specific values from the base class). The returned values are: fps, rot -> oldHeight ta -> height, angle, flipped spring -> rx, ry, rz, dist free -> rx, ry, rz, vx, vy, vz, avx, avy, avz ov -> (nil) * `Spring.GetCameraState(false)` also pushes camname * changelog++ * rm `GetCurrentCamera`, header * rm `GetCurrentCamera`, cpp part * rm `GetCurrentCamera`, txt part |
|||
mod - doc/changelog.txt | [ Diff ] [ File ] | |||
mod - rts/Lua/LuaUnsyncedRead.cpp | [ Diff ] [ File ] |