/* call-seq: * player.pos -> Array * * This method returns the current position of the player. */ static VALUE playerRecord_getPos(VALUE self) { bz_PlayerRecord *playerRecord; Data_Get_Struct(self, bz_PlayerRecord, playerRecord); VALUE pos = rb_ary_new(); rb_ary_push(pos, rb_float_new(playerRecord->pos[0])); rb_ary_push(pos, rb_float_new(playerRecord->pos[1])); rb_ary_push(pos, rb_float_new(playerRecord->pos[2])); return pos; }