Skip to content

Instantly share code, notes, and snippets.

@s-l-teichmann
s-l-teichmann / tilegen.go
Created October 22, 2012 04:03
Example using 2D Simplex noise
// Copyright 2012 by Sascha L. Teichmann. All rights reserved.
//
// Simple example how to use 2D Simplex noise.
// $ go get bitbucket.org/s_l_teichmann/simplexnoise
// $ go build tilegen.go
//
package main
import (
"bitbucket.org/s_l_teichmann/simplexnoise"
@s-l-teichmann
s-l-teichmann / tilegen3d.go
Created October 22, 2012 23:49
Example using 3D Simplex noise
// Copyright 2012 by Sascha L. Teichmann. All rights reserved.
//
// Simple example how to use 3D Simplex noise.
// $ go get bitbucket.org/s_l_teichmann/simplexnoise
// $ go build tilegen3d.go
//
package main
import (
"bitbucket.org/s_l_teichmann/simplexnoise"
@s-l-teichmann
s-l-teichmann / multidimrangesearch.py
Created November 5, 2012 01:12
Little script to play around with the code and data of H. Tropf, H. Herzog's paper 1981 paper "Multidimensional Range Search in Dynamically Balanced Trees".
#!/usr/bin/env/python
#
# Little script to play around with the code and
# data of H. Tropf, H. Herzog's paper 1981 paper
# "Multidimensional Range Search in Dynamically
# Balanced Trees".
#
# Thanks to Bernhard Herzog (unrelated to H. Herzog)
# for having a second look at the code.
#
@s-l-teichmann
s-l-teichmann / bigmintest.go
Created November 5, 2012 01:15
Little program to check the equality of a stupid and a clever implementation of the BIGMIN function.
//
// bigmintest.go
// --------------
//
// Little program to check the equality of a stupid and
// a clever implementation of the BIGMIN function.
//
// (c) 2012 by Sascha L. Teichmann
//
package main
@s-l-teichmann
s-l-teichmann / terrainstore.go
Created November 5, 2012 01:18
Fills a LevelDB with generated terrain chunks.
//
// terrainstore.go
// ---------------
//
// Fills a LevelDB with generated terrain chunks.
//
// (c) 2012 by Sascha L. Teichmann
//
package main
@s-l-teichmann
s-l-teichmann / terrainfetch.go
Created November 5, 2012 01:22
Fetches terrain chunks from a LevelDB.
//
// terrainfetch.go
// ---------------
//
// Fetches terrain chunks from a LevelDB.
//
// (c) 2012 by Sascha L. Teichmann
//
package main
diff --git a/src/connection.cpp b/src/connection.cpp
index 7bff5b1..b910841 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -1433,7 +1433,8 @@ bool Connection::checkIncomingBuffers(Channel *channel, u16 &peer_id,
else if(type == TYPE_RELIABLE)
{
// Recursive reliable packets not allowed
- assert(reliable == false);
+ if(reliable)
@s-l-teichmann
s-l-teichmann / gist:401bcfc6d495f8752c18
Created April 30, 2014 13:20
Make github.com/go-gl/glu compile again.
diff --git a/glu.go b/glu.go
index cd0d471..54b226b 100644
--- a/glu.go
+++ b/glu.go
@@ -137,17 +137,17 @@ func NewQuadric() unsafe.Pointer {
}
func Sphere(q unsafe.Pointer, radius float32, slices, stacks int) {
- C.gluSphere((*[0]byte)(q), C.GLdouble(radius), C.GLint(slices), C.GLint(stacks))
+ C.gluSphere((*C.GLUquadric)(q), C.GLdouble(radius), C.GLint(slices), C.GLint(stacks))
// A simple experiment to check how fast point in polygon tests with
// a first level spatial index filter are.
//
// This is Free Software covered by the MIT license.
// See https://opensource.org/licenses/MIT for details.
// (c) 2017 by Sascha L. Teichmann ([email protected])
//
package main
import (
@s-l-teichmann
s-l-teichmann / parassh.go
Last active August 28, 2017 14:58
Simple experiment to parallel ssh-ing into remote machines with Go
// Simple experiment to parallel ssh-ing into remote machines with Go.
//
// (c) 2017 by Sascha L. Teichmann
// The is Free Software covered by the terms of the MIT License.
// See https://opensource.org/licenses/MIT for details.
//
package main
import (
"bufio"