aboutsummaryrefslogtreecommitdiff
path: root/po/sr_Cyrl
diff options
context:
space:
mode:
authorAuke Kok <sofar+github@foo-projects.org>2017-04-28 11:11:43 -0700
committerSmallJoker <SmallJoker@users.noreply.github.com>2017-04-28 20:11:43 +0200
commite21a1ab3bd31f9b854ef77c33698624755fc915c (patch)
tree3795e0ecbfac9d1615f7de04d29151b4d17e0ae3 /po/sr_Cyrl
parentc761717f11837828bfb57998273695419a28e6eb (diff)
downloadminetest-e21a1ab3bd31f9b854ef77c33698624755fc915c.tar.gz
minetest-e21a1ab3bd31f9b854ef77c33698624755fc915c.tar.bz2
minetest-e21a1ab3bd31f9b854ef77c33698624755fc915c.zip
Allow mesh and nodeboxes to wave like plants or leaves. (#3497)
We introduce a new value for "waving" - 2: 0 - waving disabled 1 - wave like a plant 2 - wave like a leave Plantlike nodes will only allow waving = 1, but for leaves we will permit both 1 and 2 since current minetest_game sets it to 1 for all leaves. This makes it somewhat backwards compatible. For mesh and nodebox, values 1 and 2 are both valid, and the node can wave in both fashions as desired. I've tested this with the crops:corn plants, which are mesh nodes, and the results are really good. The code change is trivial as well, so I've opted to document the waving parameter in lua_api.txt because it was missing from there. Nodeboxes likely will not wave properly unless waving = 2. However it's possible that waving=1 may be desired by some mod developers for geometries I have not tried, so the code will not prohibit either value for mesh and nodebox drawtypes. Add lua_api.txt documentation for this feature and document both the existing functionality and the expansion to mesh and nodebox drawtypes.
Diffstat (limited to 'po/sr_Cyrl')
0 files changed, 0 insertions, 0 deletions
pan class="hl kwc">class OnDemandSoundFetcher { public: virtual void fetchSounds(const std::string &name, std::set<std::string> &dst_paths, std::set<std::string> &dst_datas) = 0; }; struct SimpleSoundSpec { std::string name; float gain; SimpleSoundSpec(std::string name="", float gain=1.0): name(name), gain(gain) {} bool exists() {return name != "";} // Serialization intentionally left out }; class ISoundManager { public: virtual ~ISoundManager(){} // Multiple sounds can be loaded per name; when played, the sound // should be chosen randomly from alternatives // Return value determines success/failure virtual bool loadSoundFile(const std::string &name, const std::string &filepath) = 0; virtual bool loadSoundData(const std::string &name, const std::string &filedata) = 0; virtual void updateListener(v3f pos, v3f vel, v3f at, v3f up) = 0; virtual void setListenerGain(float gain) = 0; // playSound functions return -1 on failure, otherwise a handle to the // sound. If name=="", call should be ignored without error. virtual int playSound(const std::string &name, bool loop, float volume) = 0; virtual int playSoundAt(const std::string &name, bool loop, float volume, v3f pos) = 0; virtual void stopSound(int sound) = 0; virtual bool soundExists(int sound) = 0; virtual void updateSoundPosition(int sound, v3f pos) = 0; int playSound(const SimpleSoundSpec &spec, bool loop) { return playSound(spec.name, loop, spec.gain); } int playSoundAt(const SimpleSoundSpec &spec, bool loop, v3f pos) { return playSoundAt(spec.name, loop, spec.gain, pos); } }; class DummySoundManager: public ISoundManager { public: virtual bool loadSoundFile(const std::string &name, const std::string &filepath) {return true;} virtual bool loadSoundData(const std::string &name, const std::string &filedata) {return true;} void updateListener(v3f pos, v3f vel, v3f at, v3f up) {} void setListenerGain(float gain) {} int playSound(const std::string &name, bool loop, float volume) {return 0;} int playSoundAt(const std::string &name, bool loop, float volume, v3f pos) {return 0;} void stopSound(int sound) {} bool soundExists(int sound) {return false;} void updateSoundPosition(int sound, v3f pos) {} }; // Global DummySoundManager singleton extern DummySoundManager dummySoundManager; #endif