Skip to content

Instantly share code, notes, and snippets.

View celeron55's full-sized avatar

celeron55 celeron55

View GitHub Profile
// Assignment:
var number = 42
var opposite = true
// Conditions:
number = opposite ? -42 : number
// Functions:
var square = function(x){ return x * x }
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index ad819e7..ff8ef52 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -492,15 +492,15 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
// -Z towards +Z, thus the direction is +Z.
// Rotate texture to make animation go in flow direction
// Positive if liquid moves towards +Z
- int dz = (corner_levels[side_corners[2][0]] +
- corner_levels[side_corners[2][1]] <
diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp
index 7f7cd84..15d5d2c 100644
--- a/src/playlist/playlistview.cpp
+++ b/src/playlist/playlistview.cpp
@@ -779,6 +779,9 @@ void PlaylistView::MaybeAutoscroll() {
void PlaylistView::JumpToCurrentlyPlayingTrack() {
Q_ASSERT(playlist_);
+ // Usage of the "Jump to the currently playing track" action shall enable autoscroll
+ inhibit_autoscroll_ = false;
diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp
index 7f7cd84..15d5d2c 100644
--- a/src/playlist/playlistview.cpp
+++ b/src/playlist/playlistview.cpp
@@ -779,6 +779,9 @@ void PlaylistView::MaybeAutoscroll() {
void PlaylistView::JumpToCurrentlyPlayingTrack() {
Q_ASSERT(playlist_);
+ // Usage of the "Jump to the currently playing track" action shall enable autoscroll
+ inhibit_autoscroll_ = false;
16:57:01.481 ERROR Database:595 db error: QSqlError(-1, "Parameter count mismatch", "")
16:57:01.481 ERROR Database:596 faulty query: "INSERT INTO musicd_songs (title, album, artist, albumartist, composer, track, disc, bpm, year, genre, comment, compilation, bitrate, samplerate, directory, filename, mtime, ctime, filesize, sampler, art_automatic, art_manual, filetype, playcount, lastplayed, rating, forced_compilation_on, forced_compilation_off, effective_compilation, skipcount, score, beginning, length, cue_path, unavailable, effective_albumartist, etag) VALUES (:title, :album, :artist, :albumartist, :composer, :track, :disc, :bpm, :year, :genre, :comment, :compilation, :bitrate, :samplerate, :directory, :filename, :mtime, :ctime, :filesize, :sampler, :art_automatic, :art_manual, :filetype, :playcount, :lastplayed, :rating, :forced_compilation_on, :forced_compilation_off, :effective_compilation, :skipcount, :score, :beginning, :length, :cue_path, :unavailable, :effect
pick 0fd4508 3D model support for players using Irrlicht. Also ready the basis for mesh support on nodes / items via LUA (to be done). Supports any mesh format compatible with Irrlicht, but animations are not set up yet.
pick 12331c5 Properly set texture on meshes. Also revert the player back to "upright_sprite" because LUA will be used to set meshes (via obj:set_properties)
pick 8b1347f Properly read the mesh from LUA. Players can now be set to meshes using the following test script:
pick f85339b Fix segmentation fault and prevent server from crashing if the mesh is not found
pick dba9c03 Fix material properties and allow lighting. Models should now be affected by light instead of being black
pick 8e94f8c Add a subfolder called models in the folders loaded from /mods, and filter by extention (obj md2 and md3 are currently allowed). The model path must however be changed and not use a direct location, but MineTest's media database
pick c9490fd Get rid of the texture string and use the existing textures array.
pick 7e968cf Add script to turn players into meshes, ticks every 1 second
pick f6b38ff Trigger the player.lua file in init.lua
pick 1972639 Commit the ugly and temporary test model and texture. We'll get to a real animated player mesh once the code for that is ready
pick c805953 Use pure file names instead of full paths now that data is being written to / read form memory
pick 50c4cf3 Set visual_size accordingly so the player model doesn't stretch vertically (default of the sprite player)
pick 207183a Attempt to use the b3d model format, although it doesn't seem to work so far
pick 4e1a2db b3d, you have failed me. x model format, you're in
pick 3c7651d Get rid of the old model files
pick b75be08 Entries for the newly added animation features
pick 70bee7c Update player script to work with the latest code
diff --git a/src/tile.cpp b/src/tile.cpp
index f7f1779..eeddc4e 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -373,6 +373,18 @@ class TextureSource : public IWritableTextureSource
// AtlasPointer based on it's texture id
void updateAP(AtlasPointer &ap);
+ bool isKnownSourceImage(const std::string &name)
+ {
diff --git a/src/tile.cpp b/src/tile.cpp
index f7f1779..eeddc4e 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -373,6 +373,18 @@ class TextureSource : public IWritableTextureSource
// AtlasPointer based on it's texture id
void updateAP(AtlasPointer &ap);
+ bool isKnownSourceImage(const std::string &name)
+ {
diff --git a/src/irrlichttypes.h b/src/irrlichttypes.h
index 8217729..c7d1233 100644
--- a/src/irrlichttypes.h
+++ b/src/irrlichttypes.h
@@ -24,14 +24,15 @@
using namespace irr;
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__BORLANDC__)