@@ -837,9 +837,16 @@ void har_spawn_oil(object *obj, vec2i pos, int amount, fixedpt gravityf, int lay
837837 // burning oil
838838 for (int i = 0 ; i < amount ; i ++ ) {
839839 // Calculate velocity etc.
840- fixedpt rv = fixedpt_fromint (rand_int (100 ) - 50 ) / 100 ;
840+ #if 0
841+ float fvelx = (5 * cosf (90 + i - (amount ) / 2 + frv )) * object_get_direction (obj );
842+ float fvely = -12 * sinf (i / amount + frv );
843+ fixedpt velx = fixedpt_rconst (fvelx );
844+ fixedpt vely = fixedpt_rconst (fvely );
845+ #else
846+ fixedpt rv = rand_fixedpt (FIXEDPT_ONE ) - FIXEDPT_ONE_HALF ;
841847 fixedpt velx = (5 * - fixedpt_cos (fixedpt_fromint (i - (amount ) / 2 ) + rv )) * object_get_direction (obj );
842- fixedpt vely = -12 * fixedpt_sin (fixedpt_fromint (i ) / amount + rv );
848+ fixedpt vely = -12 * fixedpt_sin (rv );
849+ #endif
843850
844851 // Make sure the oil drops have somekind of velocity
845852 // (to prevent floating scrap objects)
@@ -873,7 +880,7 @@ void har_spawn_scrap(object *obj, vec2i pos, int amount) {
873880 // wild ass guess
874881 int oil_amount = amount / 3 ;
875882 har * h = object_get_userdata (obj );
876- har_spawn_oil (obj , pos , oil_amount , 1 , RENDER_LAYER_TOP );
883+ har_spawn_oil (obj , pos , oil_amount , FIXEDPT_ONE , RENDER_LAYER_TOP );
877884
878885 // scrap metal
879886 // TODO this assumes the default scrap level and does not consider BIG[1-9]
0 commit comments