#include "vehicle.h"
-VG_STATIC int spawn_car( int argc, const char *argv[] )
-{
+VG_STATIC int spawn_car( int argc, const char *argv[] ){
v3f ra, rb, rx;
- v3_copy( main_camera.pos, ra );
- v3_muladds( ra, main_camera.transform[2], -10.0f, rb );
+ v3_copy( skaterift.cam.pos, ra );
+ v3_muladds( ra, skaterift.cam.transform[2], -10.0f, rb );
float t;
if( spherecast_world( world_current_instance(), ra, rb,
- gzoomer.obj.inf.sphere.radius, &t, rx ) != -1 )
+ gzoomer.obj.inf.sphere.radius, &t, rx, 0 ) != -1 )
{
v3_lerp( ra, rb, t, gzoomer.obj.rb.co );
gzoomer.obj.rb.co[1] += 4.0f;
#if 1
float t;
if( spherecast_world( world_current_instance(), pa, pb,
- k_car_wheel_radius, &t, n ) == -1 )
+ k_car_wheel_radius, &t, n, 0 ) == -1 )
{ t = 1.0f;
}
m4x3f mtx;
m3x3_copy( gzoomer.obj.rb.to_world, mtx );
v3_copy( pc, mtx[3] );
- debug_sphere( mtx, k_car_wheel_radius, VG__BLACK );
+ vg_line_sphere( mtx, k_car_wheel_radius, VG__BLACK );
vg_line( pa, pc, VG__WHITE );
v3_copy( pc, gzoomer.wheels[index] );
rb_ct manifold[64];
int len = rb_sphere__scene( rb->to_world, &gzoomer.obj.inf.sphere, NULL,
&world_current_instance()->rb_geo.inf.scene,
- manifold );
+ manifold, 0 );
for( int j=0; j<len; j++ ){
manifold[j].rba = rb;
manifold[j].rbb = &world_current_instance()->rb_geo.rb;