Permalink
Browse files

cube assembler replaced with a raycasting one - buggy, but faster!

  • Loading branch information...
1 parent 7c25459 commit cbbdfa1f0a1a332584d49ded2eaec85ad6220996 @iamgreaser committed Nov 12, 2012
Showing with 1,766 additions and 386 deletions.
  1. +8 −4 pkg/base/main_client.lua
  2. +306 −382 render.c
  3. +1,452 −0 render.old1
View
@@ -136,11 +136,15 @@ function new_player(settings)
function this.spawn()
local xlen,ylen,zlen
xlen,ylen,zlen = common.map_get_dims()
- this.x = math.floor(math.random()*xlen/4.0)+0.5
- this.z = math.floor(math.random()*zlen)+0.5
- this.y = (common.map_pillar_get(this.x, this.z))[1+1]-3.0
- if this.team == 1 then this.x = xlen - this.x end
+ while true do
+ this.x = math.floor(math.random()*xlen/4.0)+0.5
+ this.z = math.floor(math.random()*zlen)+0.5
+ if this.team == 1 then this.x = xlen - this.x end
+ this.y = (common.map_pillar_get(this.x, this.z))[1+1]
+ if this.y < 63 then break end
+ end
+ this.y = this.y - 3.0
this.alive = true
this.spawned = true
Oops, something went wrong.

0 comments on commit cbbdfa1

Please sign in to comment.